| Summary: | [plan] [ITIT] Import reference to an intertype inner type in the target type causes spurious reconciling error | ||
|---|---|---|---|
| Product: | [Tools] AJDT | Reporter: | Andrew Eisenberg <andrew.eisenberg> |
| Component: | Core | Assignee: | AJDT-inbox <AJDT-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | ||
| Version: | 2.1.1 | ||
| Target Milestone: | 2.1.2 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
Fixed. The problem was that we weren't properly creating TypeBindings for the synthetic intertype innertypes that wree pushed into the target type. |
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(); } }