langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java
changeset 30999 f1bb0191a5a7
parent 29149 3fa94aad0264
child 31506 4e07f827a794
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Fri May 29 09:15:42 2015 +0530
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Fri May 29 10:15:36 2015 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -407,12 +407,11 @@
             }
         }
 
-        /** Remove symbol from this scope.  Used when an inner class
-         *  attribute tells us that the class isn't a package member.
+        /** Remove symbol from this scope.
          */
         public void remove(Symbol sym) {
             Assert.check(shared == 0);
-            Entry e = lookup(sym.name);
+            Entry e = lookup(sym.name, candidate -> candidate == sym);
             if (e.scope == null) return;
 
             // remove e from table and shadowed list;