| Summary: | [inline] Problems invoking on Method with varargs | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Benjamin Pasero <ENJ> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Brian.Miller, markus.kell.r |
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
Note: the compiler should issue an type safety warning for the call 'argtest(new ArrayList<Integer>())' (see Bug 106325). The solution would be one of these (both also producing a type safety warning: a.) ArrayList<? extends Number>[] al= new ArrayList[] {new ArrayList<Integer>()}; b.) ArrayList<? extends Number>[] al= (ArrayList<? extends Number>[]) new ArrayList<?>[] {new ArrayList<Integer>()}; This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Version: 3.1.0 Build id: I20050509-2010 Steps to reproduce: 1.) Have a Class Foo: public class Foo { void foo() { argtest(new ArrayList<Integer>()); } void argtest(ArrayList<? extends Number>... al) { } } 2.) Call Refactor > Inline on "argtest" Actual Results: void foo() { ArrayList<? extends Number>[] al = { new ArrayList<Integer>() }; } results in an error: Cannot create a generic array of ArrayList<? extends Number> Expected Results: No Compile Error. Regards, Ben