Summary: | [1.6][compiler] Sun javac compiles code ok but Eclipse fails with error | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Victort Kirst <victor.kirst> | ||||
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||
Status: | VERIFIED DUPLICATE | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | jarthana, satyam.kandula, srikanth_sankaran | ||||
Version: | 3.7 | ||||||
Target Milestone: | 3.6 M2 | ||||||
Hardware: | Macintosh | ||||||
OS: | Mac OS X - Carbon (unsup.) | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Victort Kirst
2010-06-16 04:22:45 EDT
Created attachment 172020 [details]
Demonstrates the bug
This is a defect in the Sun/Oracle compiler. See http://bugs.sun.com/view_bug.do?bug_id=6182950 fixed and released only in the JDK 7 stream. Accordingly if I compile the snippet attached to this bug using javac 7 I get: Test.java:23: name clash: asArray(Collection<Long>) and asArray(Collection<Integ er>) have the same erasure public static long[] asArray(Collection<Long> list) { ^ Test.java:9: method asArray in class Test cannot be applied to given types System.out.println(Test.asArray(Arrays.asList(1l, 2l, 3l, ^ required: Collection<Integer> found: List<Long> 2 errors *** This bug has been marked as a duplicate of bug 289247 *** I see. Thank You for the fast response. Verified for 3.7M1 using build I20100802-1800 |