Summary: | [1.5][compiler] Eclipse accepts assignment between captures with array-type bounds | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M7 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Markus Keller
2005-04-28 05:08:51 EDT
Added GenericTypeTest#test632-633. Tuned compatibility check against array bounded captures. Fixed Fixed Philippe, are you sure this is not a javac bug? lhs must be one of: Vector<Object[]> | Vector<Object> | Vector<Serializable> | Vector<Cloneable>. rhs can be: Vector<Object[]> | Vector<Number[]> | Vector<String[]> | etc. ... Can't I take any object that I can get from a rhs Vector and put it into any one of the lhs Vectors? I can't find a relevant difference to the following snippet, which both compilers accept: Vector< ? super Number> lhsNum= null; Vector< ? extends Number > rhsNum= null; lhsNum.add(rhsNum.get(0)); Verified in I20050510-0010 Actually, I20050426-1700 was correct and this is a bug in javac: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6268476 I saw it, and there are other situations which are unclear. Waiting on spec clarification. Eclipse accepts the example from comment 0 again (fixed in bug 106865). |