Summary: | [1.5][compiler] Eclipse does not consider an error when javac does on partially typed | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Zorzella Mising name <zorzella> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | Olivier_Thomann, philippe_mulet |
Version: | 3.5 | ||
Target Milestone: | 3.5 M5 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Zorzella Mising name
2008-11-07 12:57:17 EST
I suspect this is a bug in javac, where the inference in JLS 15.12.2.8 doesn't properly exploit formal upper bounds. This combined with JLS 15.12.2.6 (unchecked conversion involved in invocation arguments) is likely accounting for the difference in behavior for javac between #baz(...) and #buz(...) invocations. I believe both invocations are fine, and we should accept them. Added GenericTypeTest#test1443. Closing as invalid. Re: // but it does not suggest casting as a Quick Fix. Quickfix is only trying to fix code correctly. The quickfix you suggested would turn bad code in unsafe code; resulting into an unchecked invocation warning. It should rather be turned into correct code, which cannot be trivially determined here. Verified for 3.5M5 |