Summary: | [1.5][compiler] Eclipse won't compile certain Combinations of generics | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | dave leatherdale <dave> | ||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||
Status: | VERIFIED DUPLICATE | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | 3.1.1 | ||||||
Target Milestone: | 3.1.2 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
dave leatherdale
2005-10-31 10:03:57 EST
Created attachment 28990 [details]
Example code
Looking at it class files do seem to be being produced for the source however the UI is telling me its an error. Also if i create a new class extending the above it claims i have implemented the iterator() method twice. This is fixed in latest. Only 8 warnings are reported: ---------- 1. WARNING in D:\tests_sources\X.java (at line 9) public class X<A extends Collection & Serializable > implements Collection ^^^^^^^^^^ Collection is a raw type. References to generic type Collection<E> should be parameterized ---------- 2. WARNING in D:\tests_sources\X.java (at line 9) public class X<A extends Collection & Serializable > implements Collection ^^^^^^^^^^ Collection is a raw type. References to generic type Collection<E> should be parameterized ---------- 3. WARNING in D:\tests_sources\X.java (at line 37) public Iterator iterator() ^^^^^^^^ Iterator is a raw type. References to generic type Iterator<E> should be parameterized ---------- 4. WARNING in D:\tests_sources\X.java (at line 49) public Object[] toArray(Object[] arg0) ^^^^^^^^ Type safety: The return type Object[] for toArray(Object[]) from the type X<A> needs unchecked conversion to conform to T[] from the type Collection<E> ---------- 5. WARNING in D:\tests_sources\X.java (at line 67) public boolean containsAll(Collection arg0) ^^^^^^^^^^ Collection is a raw type. References to generic type Collection<E> should be parameterized ---------- 6. WARNING in D:\tests_sources\X.java (at line 73) public boolean addAll(Collection arg0) ^^^^^^^^^^ Collection is a raw type. References to generic type Collection<E> should be parameterized ---------- 7. WARNING in D:\tests_sources\X.java (at line 79) public boolean removeAll(Collection arg0) ^^^^^^^^^^ Collection is a raw type. References to generic type Collection<E> should be parameterized ---------- 8. WARNING in D:\tests_sources\X.java (at line 85) public boolean retainAll(Collection arg0) ^^^^^^^^^^ Collection is a raw type. References to generic type Collection<E> should be parameterized ---------- 8 problems (8 warnings) Kent, could this be a duplicate of a bug we fixed lately? *** This bug has been marked as a duplicate of 113273 *** Added regression test org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest.test868 Verified for 3.1.2 using build M20060109-1200. |