Check for pointer to error type when looking for method.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 15 Dec 2010 22:32:03 +0000 (22:32 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 15 Dec 2010 22:32:03 +0000 (22:32 +0000)
From-SVN: r167878

gcc/go/gofrontend/types.cc

index bb93a4e88b66cce9e95ab5708ee98291e725c19d..1ed4358291e60779b0813ccf9812b64fa7bc9d4c 100644 (file)
@@ -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();