Bug 75785 - Missing binding on non-visible type
Summary: Missing binding on non-visible type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-07 08:31 EDT by Martin Aeschlimann CLA
Modified: 2004-12-14 14:57 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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