| Summary: | [1.5][compiler] Failures of inference and overload resolution | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Olivier Lefevre <lefevrol> | ||||||
| Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | eric_jodet, kent_johnson, Olivier_Thomann | ||||||
| Version: | 3.4 | ||||||||
| Target Milestone: | 3.4 M5 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Olivier Lefevre
Created attachment 87961 [details]
The test case
Simplified testcase which should compile:
interface OO<T,E> {}
interface TO<T> extends OO<String,T> {}
interface TT extends TO<String> {}
public class X {
<E, T> TO<T> combine(final TO<? super E> x, final OO<E, T>[] y) { return null; }
void foo(TT tt, TO<? super Object>[] too) {
combine(tt, too);
}
}
Added GenericTypeTest#test1269-1283 Created attachment 88422 [details]
Proposed patch
There were 2 issues.
1. Tiebreak algorithm miscomputed intersection types, where no intersection was mandated in the end. This was fooling type argument containment check.
2. Type argument containment (4.5.1.1) did not allow:
? super Object <= Object
(not described in the spec, but makes sense)
Released for 3.4M5. Fixed Verified for 3.4M5 using build I20080204-0010 Released fix in 3.3.x maintenance branch (post 3.3.2) |