summaryrefslogtreecommitdiff
path: root/test/files/run/t6392a.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-19 21:37:55 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-09-19 21:37:55 +0200
commitb8362d6aa42433ea4d423f7498d5fae155dc68b0 (patch)
tree5750590e62c1b55a90833bdc3e4cb80c1953330e /test/files/run/t6392a.scala
parent2f9f8d5d67441f6f1999d68b2b2e57f5451f8da7 (diff)
downloadscala-b8362d6aa42433ea4d423f7498d5fae155dc68b0.tar.gz
scala-b8362d6aa42433ea4d423f7498d5fae155dc68b0.tar.bz2
scala-b8362d6aa42433ea4d423f7498d5fae155dc68b0.zip
SI-6392 wraps non-terms before typecheck/eval
Wrap non-term arguments of typecheck and eval, so that toolboxes can work with full-fledged files (except for package declarations).
Diffstat (limited to 'test/files/run/t6392a.scala')
-rw-r--r--test/files/run/t6392a.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t6392a.scala b/test/files/run/t6392a.scala
new file mode 100644
index 0000000000..3a4f9fd0a5
--- /dev/null
+++ b/test/files/run/t6392a.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ val tb = cm.mkToolBox()
+ val c = tb.parse("object C")
+ println(tb.eval(c))
+} \ No newline at end of file