Don't look for methods on named pointer types.
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 3 Mar 2011 03:31:17 +0000 (03:31 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 3 Mar 2011 03:31:17 +0000 (03:31 +0000)
From-SVN: r170640

gcc/go/gofrontend/types.cc

index 368ecae127a084c8457bcae6a5433a76f306e2f8..cebf33ae384d8cc1c5e6b9a797b0b4f744812e7f 100644 (file)
@@ -7963,9 +7963,7 @@ Type::bind_field_or_method(Gogo* gogo, const Type* type, Expression* expr,
   if (type->deref()->is_error_type())
     return Expression::make_error(location);
 
-  const Named_type* nt = type->named_type();
-  if (nt == NULL)
-    nt = type->deref()->named_type();
+  const Named_type* nt = type->deref()->named_type();
   const Struct_type* st = type->deref()->struct_type();
   const Interface_type* it = type->deref()->interface_type();