Community
Participate
Working Groups
build N20050506-0010 1) create p/A.java package p; public class A { public static class B { public void fooA() {} } } } 2) create q/C.java package q; public class C { public static class B { public void fooC() {} } } public static int B() {return 0;} } 3) create a/B.java package a; public class B { public void fooB() {} } } 4) create a/Test.java package a; import static q.C.B; public class Test { void foo() { int i = B(); B b = null; b.fooA(); b.fooB(); b.fooC(); } } 5) compile 2 errors appear: -The method fooA() is undefined for the type B -The method fooC() is undefined for the type B 6) compile with javac a\Test.java:9: cannot find symbol symbol : method fooA() location: class q.C.B b.fooA(); ^ a\Test.java:10: cannot find symbol symbol : method fooB() location: class q.C.B b.fooB(); ^ 2 errors Remove "public static int B() {return 0;}" fromC.java and new errors are correct.
Added StaticImport test029 David: I've added a subclass of ImportBinding called ImportConflictBinding. It holds onto both the methodBinding & the 'hidden' type binding. You may need to check for it in Code Assist.
Verified in I20050510-0010