Summary: | [1.5][compiler] Iteration over nested arrays is broken | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Michael Schuerig <michael> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | ha_tech_2004, sven.koehler, thorsten.langer |
Version: | 3.1 | ||
Target Milestone: | 3.1 M5 | ||
Hardware: | Other | ||
OS: | Linux | ||
Whiteboard: |
Description
Michael Schuerig
2004-12-18 11:00:27 EST
smaller test-case: String[][] x = {{"X"}, {"Y"}}; List l = Arrays.asList(x); System.out.println(l.size() + " " + l.get(0).getClass().getName()); Compliance Level 1.4: 2 [Ljava.lang.String; Compliance Level 5.0: 1 [[Ljava.lang.String; Problem comes from varargs support which induces one extra array wrappering for 'x' in Arrays.asList(x) invocation. *** Bug 81911 has been marked as a duplicate of this bug. *** Tuned method type inference near varargs support. Added VarargsTest#test018-test020. Fixed I have an existing project that includes code suffering from this bug. Is there a way to make it compile in Eclipse M4? I can't wait for M5. You could wait for next nightly build, and copy plugin org.eclipse.jdt.core back into a M4 install. Verified in I20050214 |