diff options
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/run/t5230.check | 1 | ||||
-rw-r--r-- | test/pending/run/t5230.scala | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/pending/run/t5230.check b/test/pending/run/t5230.check new file mode 100644 index 0000000000..5ef4ff4d04 --- /dev/null +++ b/test/pending/run/t5230.check @@ -0,0 +1 @@ +evaluated = 2 diff --git a/test/pending/run/t5230.scala b/test/pending/run/t5230.scala new file mode 100644 index 0000000000..5aab8f9290 --- /dev/null +++ b/test/pending/run/t5230.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{ + class C { + val x = 2 + } + + println(new 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) +} |