Project: JDT
Bug 355926 [content assist] Code completion adds wrong method proposal if superclass method contains generic varargs argument
Reported: 2011-08-26 05:11:14 | Status: resolved fixed

Build Identifier: M20110825-0847 When overriding a method from a superclass which has got a generic varargs argument, code completion adds a wrong method declaration. Expected: - the following method declaration should be added @Override void method(Z<?>... zs) { // TODO Auto-generated method stub super.method(zs); } Actual: - "transient" modifier is added - varargs argument is changed to array - outer class name ("Testcase") is added - the complete method declaration looks like follows transient void method(Testcase.Z<?>[] zs) {}; Environment: - Eclipse 3.7.1 (M20110825-0847) - JDK 7 --- class Testcase { static interface Z<T> {} static class A { void method(Z<?>... zs) {} } static class B extends A { // - type here `method` and then use code completion (ctrl + space) } } --- Reproducible: Always

Files changed in fix:
org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/contentassist/CodeCompletionTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java