Community
Participate
Working Groups
Build ID: M20070921-1145 Steps To Reproduce: class Test { void bar() { Integer i = 0; Double d = 0.0; foo((Collection<Number>) Arrays.asList(i, d)); } void foo(Collection<Number> c) {} } More information: The code is fails to compile in JDK 1.6.06 but succeeds in Eclipse.
Cast semantics got tightened during 3.4 cycle. This issue is now resolved. Closing as worksforme
Added GenericTypeTest#test1340
We now report: "Cannot cast from List<Number&Comparable<?>> to Collection<Number>"
Verified for 3.4RC4 using I20080606-0100
Regression test is actually GenericTypeTest#test1341