Community
Participate
Working Groups
The below classes generate an error in Eclipse despite compiling fine via javac: public class Test { interface A<B> { void x(Test2 pType, B... mediaObject); void x(Test2 pType, String text, int offset); } void foo() {bar().x(Test2.X, "");} A<?> bar() {return null;} } public enum Test2 {X}
This behavior seems to date back to quite a while to at least 3.6.2, perhaps even earlier.
I won't be able to finish this. Reverting to inbox so some one else may pick it up.
The example code in this bug report does not compile any more with javac 1.8.0_92. It seems like this was a bug in javac and that ecj was right all along. I suggest that this bug report is closed. ### javac output $ javac Test.java Test.java:8: error: method x in interface A<B> cannot be applied to given types; bar().x(Test2.X, ""); ^ required: Test2,CAP#1[] found: Test2,String reason: varargs mismatch; String cannot be converted to CAP#1 where B is a type-variable: B extends Object declared in interface A where CAP#1 is a fresh type-variable: CAP#1 extends Object from capture of ? 1 error
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.