summaryrefslogtreecommitdiff
path: root/test/files/run/reify_inner1.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-02-13 22:04:54 +0100
committerEugene Burmako <xeno.by@gmail.com>2012-02-14 00:40:51 +0100
commitadb218d8d230b4713942f5b220d8cd0602995aae (patch)
treeed6db1c13ca3a36098ca54f9a5c46e2e82f0e59f /test/files/run/reify_inner1.scala
parent6548dcf12d83e327df2f90048140fb95346b7e95 (diff)
downloadscala-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/reify_inner1.scala')
-rw-r--r--test/files/run/reify_inner1.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/reify_inner1.scala b/test/files/run/reify_inner1.scala
new file mode 100644
index 0000000000..69931198e0
--- /dev/null
+++ b/test/files/run/reify_inner1.scala
@@ -0,0 +1,22 @@
+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 {
+ class D {
+ val x = 2
+ }
+ }
+
+ val outer = new C()
+ val inner = new outer.D()
+ println(inner.x)
+ };
+
+ val reporter = new ConsoleReporter(new Settings)
+ val toolbox = new ToolBox(reporter)
+ val ttree = toolbox.typeCheck(code.tree)
+ toolbox.runExpr(ttree)
+}