What steps will reproduce the problem?
1. Declare a method with variable arguments in an interface
2. Annotate an delegate object
3. Attempt to invoke the variable-argument method
4. The compiler will complain about expecting an array when the array should
accept variable arguments.
What is the expected output? What do you see instead?
The method should work as defined by the delegate. The generated method does
is not variable, but should be.
Hypothetical example:
public class Main {
public interface Foo {
void bar(Object... baz);
}
public static class Qux implements Foo {
@Override
public void bar(final Object... baz) {}
}
@Delegate(types=Foo.class)
private final Foo foo = new Qux();
public static void main(final String[] args) {
new Main().bar("quo");
// error: method bar in class Main cannot be applied to given types;
// bar("quo");
// required: Object[]
// found: String
// reason: actual and formal argument lists differ in length
}
}
What version of the product are you using? On what operating system?
0.11.8, Rhel 5, 64-bit
Original issue reported on code.google.com by integ...@gmail.com on 23 Jul 2013 at 6:29
Original issue reported on code.google.com by
integ...@gmail.com
on 23 Jul 2013 at 6:29