Don't bother to check for duplicate interface/named methods.
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 28 Mar 2011 21:20:10 +0000 (21:20 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 28 Mar 2011 21:20:10 +0000 (21:20 +0000)
A named interface type can't have named methods anyhow.

From-SVN: r171630

gcc/go/gofrontend/types.cc

index 6feb035a9267c280b21152df49e0628bcdc23887..47dbc162c993b545f277c01f01564053beab4eec 100644 (file)
@@ -7029,9 +7029,8 @@ Named_type::do_verify()
   if (this->local_methods_ != NULL)
     {
       Struct_type* st = this->type_->struct_type();
-      Interface_type* it = this->type_->interface_type();
       bool found_dup = false;
-      if (st != NULL || it != NULL)
+      if (st != NULL)
        {
          for (Bindings::const_declarations_iterator p =
                 this->local_methods_->begin_declarations();
@@ -7046,13 +7045,6 @@ Named_type::do_verify()
                           Gogo::message_name(name).c_str());
                  found_dup = true;
                }
-             if (it != NULL && it->find_method(name) != NULL)
-               {
-                 error_at(p->second->location(),
-                          "method %qs redeclares interface method name",
-                          Gogo::message_name(name).c_str());
-                 found_dup = true;
-               }
            }
        }
       if (found_dup)