diff options
Diffstat (limited to 'test/files/run/toolbox-varargs')
-rw-r--r-- | test/files/run/toolbox-varargs/Test.scala | 13 | ||||
-rw-r--r-- | test/files/run/toolbox-varargs/Varargs.java | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/toolbox-varargs/Test.scala b/test/files/run/toolbox-varargs/Test.scala new file mode 100644 index 0000000000..be5ab45768 --- /dev/null +++ b/test/files/run/toolbox-varargs/Test.scala @@ -0,0 +1,13 @@ +object Test { + def main(args: Array[String]): Unit = { + import scala.tools.reflect.ToolBox + val m = reflect.runtime.currentMirror + val u = m.universe + import u._ + val tb = m.mkToolBox(); + tb.compile(q"new p.Varargs(null, null)") + tb.compile(q"p.Varargs.staticMethod(null, null)") + tb.compile(q"(null: p.Varargs).instanceMethod(null, null)") + } +} + diff --git a/test/files/run/toolbox-varargs/Varargs.java b/test/files/run/toolbox-varargs/Varargs.java new file mode 100644 index 0000000000..da1dbbacc9 --- /dev/null +++ b/test/files/run/toolbox-varargs/Varargs.java @@ -0,0 +1,8 @@ +package p; + +public class Varargs { + public Varargs(String... args) {} + public static void staticMethod(String... args) {} + + public void instanceMethod(String... args) {} +} |