Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336162 - [plan] [ITIT] Import reference to an intertype inner type in the target type causes spurious reconciling error
Summary: [plan] [ITIT] Import reference to an intertype inner type in the target type ...
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 2.1.1   Edit
Hardware: Macintosh Mac OS X
: P3 minor (vote)
Target Milestone: 2.1.2   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 16:25 EST by Andrew Eisenberg CLA
Modified: 2011-03-01 13:00 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 Andrew Eisenberg CLA 2011-02-02 16:25:40 EST
Given the folliowing:

package p;
privileged aspect City_Roo_Op4j {    
    public static class City.Keys {
        public static final Function<Object, City> CITY = null;
    }
}


package p;

import p.City.Keys;
import static p.City.Keys.CITY;

public class City {  
  void x() { CITY.toString(); }
}

The two import statements as well as the reference to CITY give reconciling errors even though ajc accepts the code.  

This is caused by how CompilationUnitScope.findSingleImport() tries to resolve the import, but can't.  This will be tricky to fix since I will likely need to use some more weaving.

Note that the following class works just fine in AJDT because it resolves the import statements using an ITDAwareSourceTypeRequestor:

package p;
mport p.City.Keys;
import static p.City.Keys.CITY;
class Test {
  void x() { CITY.toString(); }
}
Comment 1 Andrew Eisenberg CLA 2011-02-04 17:43:35 EST
Fixed.  The problem was that we weren't properly creating TypeBindings for the synthetic intertype innertypes that wree pushed into the target type.