diff -r 610ec7dcf431 -r 9ec429ab0e7e src/share/classes/com/sun/tools/javac/code/Scope.java --- a/src/share/classes/com/sun/tools/javac/code/Scope.java Mon May 11 13:28:14 2015 +0530 +++ b/src/share/classes/com/sun/tools/javac/code/Scope.java Fri May 29 10:15:36 2015 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, 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 @@ -241,12 +241,16 @@ listeners = listeners.prepend(sl); } - /** 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) { + public void remove(final Symbol sym) { Assert.check(shared == 0); - Entry e = lookup(sym.name); + Entry e = lookup(sym.name, new Filter() { + @Override + public boolean accepts(Symbol candidate) { + return candidate == sym; + } + }); if (e.scope == null) return; // remove e from table and shadowed list;