Community
Participate
Working Groups
http://www.ott.oti.com/uvm/OTIIBM/numbat/Testing/JCK- 14/tests/lang/ICLS/icls005/icls00502m0012/icls00502m0012.html - POSITIVE TEST Test case: javac 1.4 compiles this code fine. Eclipse compiler fails with: ---------- 1. ERROR in icls00502m0012.java (at line 11) Z z = new Z(); ^ The field type Z is defined in an inherited type and an enclosing scope ---------- 2. ERROR in icls00502m0012.java (at line 12) int j = z.i; ^^^ z cannot be resolved ---------- javac 1.3 fails: icls00502m0012.java:11: javasoft.sqe.tests.lang.icls005.icls00502m0012.Y.Z is inherited from javasoft.sqe.tests.lang.icls005.icls00502m0012.Y and hides class in outer class javasoft.sqe.tests.lang.icls005.icls00502m0012.icls00502m0012. An explicit 'this' qualifier must be used to select the desired instance. Z z = new Z(); ^ icls00502m0012.java:11: javasoft.sqe.tests.lang.icls005.icls00502m0012.Y.Z is inherited from javasoft.sqe.tests.lang.icls005.icls00502m0012.Y and hides class in outer class javasoft.sqe.tests.lang.icls005.icls00502m0012.icls00502m0012. An explicit 'this' qualifier must be used to select the desired instance. Z z = new Z(); NOTES:
*** This bug has been marked as a duplicate of 3361 ***