Summary: | Strange errors when mixing java 1.4 and 5.0 projects | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Max Gilead <max.gilead> | ||||
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||
Status: | VERIFIED DUPLICATE | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | amj87.iitr, jared_burns, Olivier_Thomann, srikanth_sankaran | ||||
Version: | 3.3 | ||||||
Target Milestone: | 3.7 M2 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Max Gilead
2007-03-25 11:06:56 EDT
Created attachment 61923 [details]
test case
Test case
Eric, please check if this is the same problem as bug 100982. If it is, we'll make it a duplicate. (In reply to comment #2) Jérôme, the problem here seems to be different than the one in bug 100982. In this one, we have 2 projects: a 5.0 compatible one a 1.4 compatible one referencing the 5.0 compatible one. This issue here is that the LookupEnvironment.globalOptions (compiler options) is determined by the caller - here the 1.4 project. Hence, when checking the sourceLevel for the referenced method (supposed to be at 5.0 level), we always are at 1.4 level. For the current bug, the consequence of this issue is made visible in MethodScope.createMethod(AbstractMethodDeclaration), at: if (argLength > 0 && compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { In the bug scenario, the calling CU source level has a 1.4 source level, whereas the referenced method in the second project has a 1.4 source level. As a consequence, though we found it, we won't register any binding for the type parameter. Hence, the add(T o) method is not found and the error is raised in the editor. I'm hitting this same problem. We've got a 1.4 compatible plugin which references a 5.0 plugin that just changed a method signature to use generics. Now my editors are full of fake errors, which makes editing them a scary experience... Is there any way to workaround this issue? I am not able to reproduce this on 3.7 M1, but not on 3.7 M3. Closing as duplicate of bug 305259 *** This bug has been marked as a duplicate of bug 305259 *** (In reply to comment #5) > I am not able to reproduce this on 3.7 M1, but not on Grrr. It is 3.45 AM here and it shows - I meant to say I am able to reproduce this on 3.7 M1, but not on 3.7 M3. Verified for 3.7M4 using build I20101205-2000. Verified using I20101207-0250 (4.1 I-build) |