diff mbox

Go patch committed: Error on duplicate import

Message ID mcr62cco6ws.fsf@dhcp-172-18-216-180.mtv.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor May 4, 2012, 5:24 a.m. UTC
This patch to the Go frontend gives an error if a file attempts to
import the same package twice under the same name.  Bootstrapped and ran
Go testsuite on x86_64-unknown-linux-gnu.  Committed to mainline and 4.7
branch.

Ian
diff mbox

Patch

diff -r c6d54ab88baf go/gogo.cc
--- a/go/gogo.cc	Thu May 03 10:39:39 2012 -0700
+++ b/go/gogo.cc	Thu May 03 22:20:07 2012 -0700
@@ -4946,11 +4946,6 @@ 
       break;
 
     case Named_object::NAMED_OBJECT_PACKAGE:
-      if (new_object->is_package()
-	  && (old_object->package_value()->name()
-	      == new_object->package_value()->name()))
-	return old_object;
-
       break;
     }