Bug 3350

Summary: JCK 1.4 - ICLS - static class from outer and class from superclass in top-level nested class (1GK7DVJ)
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: All   
OS: Windows 2000   
Whiteboard:

Description Olivier Thomann CLA 2001-10-10 22:53:40 EDT
http://www.ott.oti.com/uvm/OTIIBM/numbat/Testing/JCK-
14/tests/lang/ICLS/icls005/icls00502m0013/icls00502m0013.html - POSITIVE TEST

	javac 1.4 compiles it fine.
	javac 1.3 fails:
icls00502m0013.java:14: javasoft.sqe.tests.lang.icls005.icls00502m0013.Y.Z is 
inherited from javasoft.sqe.tests.lang.icls005.icls00502m0013.Y and hides class 
in outer class 
javasoft.sqe.tests.lang.icls005.icls00502m0013.icls00502m0013.  An 
explicit 'this' qualifier must be used to select the desired instance.
                Z z = new Z();
                ^
icls00502m0013.java:14: javasoft.sqe.tests.lang.icls005.icls00502m0013.Y.Z is 
inherited from javasoft.sqe.tests.lang.icls005.icls00502m0013.Y and hides class 
in outer class 
javasoft.sqe.tests.lang.icls005.icls00502m0013.icls00502m0013.  An 
explicit 'this' qualifier must be used to select the desired instance.
                Z z = new Z();
                          ^
2 errors

	Eclipse compiler fails:
----------
1. ERROR in icls00502m0013.java (at line 14)
        Z z = new Z();
        ^
The field type Z is defined in an inherited type and an enclosing scope
----------
2. ERROR in icls00502m0013.java (at line 15)
        int j = z.i;
                ^^^
z cannot be resolved
----------

NOTES:
Comment 1 Philipe Mulet CLA 2001-12-10 07:08:21 EST
As per JLS 8.1.5, inherited members (here types) shadow members declared in 
enclosing types.
Comment 2 Philipe Mulet CLA 2001-12-12 13:31:53 EST

*** This bug has been marked as a duplicate of 3361 ***