Summary: | [1.5][compiler] Bogus bound mismatch errors | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Ed Merks <Ed.Merks> | ||||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | jerome_lanneluc, maxime_daniel, philippe_mulet | ||||||
Version: | 3.3 | Flags: | philippe_mulet:
pmc_approved+
|
||||||
Target Milestone: | 3.3.2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Ed Merks
2006-12-25 14:57:36 EST
Created attachment 56175 [details]
Project containing the sample
Could you please specify the Eclipse build id? I'm using 3.3M4, i.e., Build id: I20061214-1445. For javac I'm using $ "/cygdrive/c/Program Files/IBM/Java50/bin/javac" -version javac 1.5.0 Re: comment 0 > For Container, Eclipse reports errors for function "f"'s "b", "d", and "g" > parameters as having errors; javac reports errors for the "f" and "g" > parameters. I believe eclipse is right and that javac missed "b" and "d". In the light of bug 202404, I believe eclipse was wrong there as well for 'b' and 'd'. Note that I do not see eclipse (3.3) reporting an error against 'f'; I think the fix for bug 104649 is responsible for the missing diagnosis on 'f'. Reverting the fix as it is no longer needed to address bug 104649 (i.e. the fix was wrong, and other changes - likely for bug 202404 did address the original problem). Created attachment 78424 [details]
Proposed patch
Added GenericTypeTest#test1168-1170 Released for 3.4M2. Fixed Reopening. My fix breaks the following testcase: import java.util.List; public class X { static <U extends List<U>> U foo(U u) { List<U> v = null; foo(v); return u; } } ---------- foo(v); ^^^ Bound mismatch: The generic method foo(U) of type X is not applicable for the arguments (List<U>). The inferred type List<U> is not a valid substitute for the bounded parameter <U extends List<U>> ---------- Actually, the previous test change is actually expected. Closing as fixed. But only released for 3.4M3. Released for 3.4M3. should backport to 3.3.2 Released for 3.3.2 Fixed Checked that we are now consistent with javac (6_03 b05) for the initially provided test cases. Verified for 3.4 M3 using build I20071029-0010. BTW, Philippe, were the 'duplicate A and B' errors in test1170 introduced on purpose? Good catch. Fixed the test (note that it was still testing properly, since we were resilient enough). Fix is safe, and quite important for EMF. +1 for 3.3.2 Verified for 3.3.2 using build M20080123-0800. I've also fixed test #1170 in R3_3_maintenance stream. |