Bug 75785

Summary: Missing binding on non-visible type
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Aeschlimann CLA 2004-10-07 08:31:53 EDT
20041007

In the following scenario, XX is not visible (as private). The compiler marks
this at 2 locations in the qualified name and in the constructor invocation.

Use the AST view to look at the bindings:
- The second reference to 'XX' has no binding, the first has one

It would be nice if the second reference also could have the binding. Quick fix
uses these bindings to offer to correct the visibility.

package a;
public class G {
  public void useX() {
    X x= new X();
    X.XX l= x.new XX();
  }
}

package a;
public class X {
    private class XX {
    }
}
Comment 1 Olivier Thomann CLA 2004-10-07 22:22:35 EDT
I will investigate.
Comment 2 Olivier Thomann CLA 2004-10-08 14:38:29 EDT
Kent, in this case we don't return any binding for the new XX(). Can this be
easily changed?
Comment 3 Kent Johnson CLA 2004-11-24 16:42:22 EST
The resolvedType of the SingleTypeRef (new XX()) now remembers the invisible 
member type.
Comment 4 Olivier Thomann CLA 2004-12-14 14:57:46 EST
Verified in 200412140800