Summary: | [1.5][compiler] Compiler fails with indirect reference error message | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Ed Merks <Ed.Merks> | ||||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | major | ||||||||
Priority: | P3 | CC: | marcelop, philippe_mulet | ||||||
Version: | 3.3 | ||||||||
Target Milestone: | 3.2.2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows 2000 | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Ed Merks
2006-10-07 15:08:35 EDT
Created attachment 51602 [details]
Two projects that demonstrate the problem.
Often the problem shows up just in B class of project a. I.e., this error appears:
The type org.example.a.A$Entry.Internal cannot be resolved. It is indirectly referenced from required .class files a/src/org/example/a B.java line 0 1160248111755 1939091
If I modify B (add space and remove) and save it, the error goes away, and if I do it again, the error comes back. The same error occurs in project b, and in this case there is nothing I can do to make the error go away.
This same type of problem occurs when I templatize org.eclipse.emf.ecore.util.FeatureMap and then try to use FeatureMap.Entry.Internal in the org.eclipse.emf.ecore.change model, so I'm very anxious to get this working...
Smells like a buildpath issue. Reproduced with HEAD and I20061003-0800. Released (simpler) test case BuildpathTests test0100 (inactive for now). Also added GenericTypeTest#test1046-48. If removing generic type parameters from X, no more problem is detected. Problem rather lies in decoding of generic signatures from binaries. Added InnerEmulationTest#test129 with non generic scenario. Maxime - watch GenericTypeTest#test1048. Interestingly it works fine when using static classes instead of interfaces. Problem comes from misgeneration of the generic signature for Internal#createEntry(). We issue a generic signature attribute (slightly corrupted) where none is required. Should be: // Method descriptor #8 ()LX$Entry$Internal; public abstract X.Entry.Internal createEntry(); But we issue: // Method descriptor #8 ()LX$Entry$Internal; // Signature: ()LX$Entry.Internal; public abstract X.Entry.Internal createEntry(); Created attachment 51634 [details]
Proposed patch
Released for 3.3M3 (HEAD) Backporting to 3.2.2 Added GenericTypeSignatureTest#test020. Released for 3.2.2 Fixed Verified for 3.3 M3 using build I20061030-0010 verified for 3.2.2 using build M20070112-1200 |