Bug 74588 - [1.5] missing enclosing instance is wrongly reported when accessing an enclosing instance variable.
Summary: [1.5] missing enclosing instance is wrongly reported when accessing an enclos...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-22 12:03 EDT by Olivier Thomann CLA
Modified: 2004-11-04 10:40 EST (History)
0 users

See Also:


Attachments
Compile this test case in -source 1.5 -1.5 (264 bytes, text/plain)
2004-09-22 12:04 EDT, Olivier Thomann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-09-22 12:03:42 EDT
In the attached test case, we report:

----------
1. ERROR in c:\tests_sources\X.java (at line 6)
	new Y<Integer>() {
                void test() {
                    System.out.println(X.this.m);
                }
            }.test();
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
No enclosing instance of type X is accessible. Must qualify the allocation with
an enclosing instance of type X (e.g. x.new A() where x is an instance of X).
----------
1 problem (1 error)

I think this should compile fine.
Comment 1 Olivier Thomann CLA 2004-09-22 12:04:13 EDT
Created attachment 14704 [details]
Compile this test case in -source 1.5 -1.5
Comment 2 Frederic Fusier CLA 2004-10-28 04:45:17 EDT
This problem is fixed in build I200410260800.
I'll add to build notes for 3.1 M3
Comment 3 Philipe Mulet CLA 2004-10-28 05:08:02 EDT
Added regression test: GenericTypeTest#test343
Comment 4 Frederic Fusier CLA 2004-11-04 10:40:21 EST
Verified for 3.1 M3 with build I200411040800