summaryrefslogtreecommitdiff
path: root/test/files/run/reify_varargs.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/reify_varargs.scala')
-rw-r--r--test/files/run/reify_varargs.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/reify_varargs.scala b/test/files/run/reify_varargs.scala
new file mode 100644
index 0000000000..d38cbf2aac
--- /dev/null
+++ b/test/files/run/reify_varargs.scala
@@ -0,0 +1,17 @@
+import scala.tools.nsc.reporters._
+import scala.tools.nsc.Settings
+import reflect.runtime.Mirror.ToolBox
+
+object Test extends App {
+ val code = scala.reflect.Code.lift{
+ val msg = java.text.MessageFormat.format(
+ "On {1} there was {2} on planet {0}.",
+ "Hoth", "the fifth of August", "a disturbance in the Force")
+ println("Message="+msg)
+ };
+
+ val reporter = new ConsoleReporter(new Settings)
+ val toolbox = new ToolBox(reporter)
+ val ttree = toolbox.typeCheck(code.tree)
+ toolbox.runExpr(ttree)
+}