Summary: | [1.5][compiler] Call to constructor with mismatched type parameter and arguement not detected | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Matthew Sackman <matthew> | ||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | tobys | ||||
Version: | 3.2 | ||||||
Target Milestone: | 3.2 M6 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Matthew Sackman
2006-02-13 17:37:06 EST
Forgot the javac error message (Sun javac 1.5.0_06 as before):
> javac Test.java
Test.java:15: cannot find symbol
symbol : constructor ArrayList(java.util.List<java.util.Collection>)
location: class java.util.ArrayList<java.util.Collection<?>>
final List<Collection<?>> listCopy = new ArrayList<Collection<?>>(aList);
^
1 error
It feels our bug. We seem to consider that: List<Collection> <: List<? extends Collection<?>> Yeah: just tested with the IBM javac and it gives the same error as the Sun one so I'd guess it is an Eclipse issue. FYI, there is no IBM javac. Just plain javac bundled with an IBM vm. Added GenericTypeTest#test910-911. Tuned TypeBinding#isTypeArgumentContainedBy(...) Fixed Created attachment 34902 [details]
patch for TypeBinding
Excellant, many thanks indeed. You're welcome. BTW, it will not be in M5, but shortly after it (next integration in M6). Actually, the fix is quite more complex to properly deal with 'super' wildcards and array bounds. Added extra GenericTypeTest#test912-914. *** Bug 129129 has been marked as a duplicate of this bug. *** (In reply to comment #10) > Actually, the fix is quite more complex to properly deal with 'super' wildcards > and array bounds. > Added extra GenericTypeTest#test912-914. Is the reminded fix removed between IBuild from 02/21 and 3.2M5a. While IBuild from 02/21 for Linux correctly detects the incorrect code, 3.2M5a does not realize it. 3.2M5a did cause some confusion. It is only 3.2M5+one extra fix from the platform. It is not part of the M6 cycle, which this fix belongs to. So though 3.2M5a got issued after I20060221, it doesn't contain the fix you are looking for. Verified for 3.2 M6 using build I20060328-0010 |