diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-02-13 22:04:54 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-02-14 00:40:51 +0100 |
commit | adb218d8d230b4713942f5b220d8cd0602995aae (patch) | |
tree | ed6db1c13ca3a36098ca54f9a5c46e2e82f0e59f /test/files/run/t5229_2.scala | |
parent | 6548dcf12d83e327df2f90048140fb95346b7e95 (diff) | |
download | scala-adb218d8d230b4713942f5b220d8cd0602995aae.tar.gz scala-adb218d8d230b4713942f5b220d8cd0602995aae.tar.bz2 scala-adb218d8d230b4713942f5b220d8cd0602995aae.zip |
Fixes https://issues.scala-lang.org/browse/SI-5229
Diffstat (limited to 'test/files/run/t5229_2.scala')
-rw-r--r-- | test/files/run/t5229_2.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t5229_2.scala b/test/files/run/t5229_2.scala new file mode 100644 index 0000000000..67be7328a6 --- /dev/null +++ b/test/files/run/t5229_2.scala @@ -0,0 +1,19 @@ +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{ + object C { + val x = 2 + } + + println(C.x) + }; + + val reporter = new ConsoleReporter(new Settings) + val toolbox = new ToolBox(reporter) + val ttree = toolbox.typeCheck(code.tree) + val evaluated = toolbox.runExpr(ttree) + println("evaluated = " + evaluated) +} |