aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/expressions.cc6
2 files changed, 5 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index e6a0f84..0cf4f03 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-affb1bf5fcd7abf05993c54313d8000b93a08d4a
+0476944600d456b2616981fff90c77be5e06edd5
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/expressions.cc b/gcc/go/gofrontend/expressions.cc
index bdc14aa..803611d 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -11439,7 +11439,8 @@ Expression*
Selector_expression::lower_method_expression(Gogo* gogo)
{
Location location = this->location();
- Type* type = this->left_->type();
+ Type* left_type = this->left_->type();
+ Type* type = left_type;
const std::string& name(this->name_);
bool is_pointer;
@@ -11469,7 +11470,8 @@ Selector_expression::lower_method_expression(Gogo* gogo)
imethod = it->find_method(name);
}
- if (method == NULL && imethod == NULL)
+ if ((method == NULL && imethod == NULL)
+ || (left_type->named_type() != NULL && left_type->points_to() != NULL))
{
if (!is_ambiguous)
error_at(location, "type %<%s%s%> has no method %<%s%>",