Bug 135323

Summary: [compiler] Anonymous inner class scope error
Product: [Eclipse Project] JDT Reporter: Chris Longfield <clongfield>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
example project demonstrating the scope error none

Description Chris Longfield CLA 2006-04-06 13:00:01 EDT
An anonymous inner class that refers to a variable of the enclosing class erroneously reports the variable to be inaccessible if the immediate public superclass of the inner class does not define the variable and the super superclass does define the variable but is out of scope.
(example attached)
Comment 1 Chris Longfield CLA 2006-04-06 13:00:56 EDT
Created attachment 37915 [details]
example project demonstrating the scope error
Comment 2 Philipe Mulet CLA 2006-04-26 12:16:56 EDT
We do the right thing for method lookups, but not for fields.
Comment 3 Philipe Mulet CLA 2006-04-26 15:14:07 EDT
Problem comes from blaming non visible receiver type, which is then changing the lookup semantics, where non visible field (only) is subsumed by enclosing match.

Added LookupTest#test065-067.
Fixed
Comment 4 Philipe Mulet CLA 2006-04-26 15:16:01 EDT
fixed
Comment 5 Olivier Thomann CLA 2006-04-28 14:00:51 EDT
Verified with I20060427-1600 for 3.2RC2