aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 22:32:03 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 22:32:03 +0000
commit97d2b658622fb09c02d5ae58b10f94d839640b8a (patch)
tree3d6e25d0a7a69bef6d736ef637b2207830585b1b /gcc
parent5b26ad55422e05f0a02c80bddab6bc16f91e6345 (diff)
downloadgcc-97d2b658622fb09c02d5ae58b10f94d839640b8a.zip
gcc-97d2b658622fb09c02d5ae58b10f94d839640b8a.tar.gz
gcc-97d2b658622fb09c02d5ae58b10f94d839640b8a.tar.bz2
Check for pointer to error type when looking for method.
From-SVN: r167878
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/types.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index bb93a4e..1ed4358 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -7564,7 +7564,7 @@ Type::bind_field_or_method(Gogo* gogo, const Type* type, Expression* expr,
const std::string& name,
source_location location)
{
- if (type->is_error_type())
+ if (type->deref()->is_error_type())
return Expression::make_error(location);
const Named_type* nt = type->named_type();