Details
Description
Take this Java class:
Dsl.java
public class Dsl { public static void novarargs(java.util.List s) { System.out.println("novarargs ok"); } public static void varargs(Object... s) { System.out.println("varargs ok"); } }
Run it with Groovy:
UseDsl.groovy
this.metaClass.mixin(Dsl) Dsl.novarargs(["a", "b"]) novarargs(["a", "b"]) Dsl.varargs("a", "b") varargs("a", "b") // fails here
The last one fails:
javac Dsl.java && groovy UseDsl.groovy Caught: java.lang.IllegalArgumentException: wrong number of arguments at UseDsl.run(UseDsl.groovy:7)