aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/types.cc9
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index c14a10f..af4d052 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-534fb907c821b052dc430330708d7fa555b91fe3
+68b1c7659a6b25d537a4ff3365ab070fa6215b0b
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 286ecc1..23d1647 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -12052,6 +12052,15 @@ Type::bind_field_or_method(Gogo* gogo, const Type* type, Expression* expr,
ambig2.c_str());
else if (found_pointer_method)
go_error_at(location, "method requires a pointer receiver");
+ else if (it != NULL && it->is_empty())
+ go_error_at(location,
+ "reference to method %qs in interface with no methods",
+ Gogo::message_name(name).c_str());
+ else if (it == NULL && type->deref()->interface_type() != NULL)
+ go_error_at(location,
+ ("reference to method %qs in type that is "
+ "pointer to interface, not interface"),
+ Gogo::message_name(name).c_str());
else if (nt == NULL && st == NULL && it == NULL)
go_error_at(location,
("reference to field %qs in object which "