summaryrefslogtreecommitdiff
path: root/test/files/run/t7045.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-02-07 09:14:42 +0100
committerEugene Burmako <xeno.by@gmail.com>2013-10-18 17:48:51 +0200
commit544ae248aabaf919294f2aa375ebbd92b1c8757d (patch)
tree7a007e9103d68c8b6ee123d98cc4a39d33e5ed32 /test/files/run/t7045.scala
parentd05566ca327103d61b071a5022be98f1f3f045f3 (diff)
downloadscala-544ae248aabaf919294f2aa375ebbd92b1c8757d.tar.gz
scala-544ae248aabaf919294f2aa375ebbd92b1c8757d.tar.bz2
scala-544ae248aabaf919294f2aa375ebbd92b1c8757d.zip
SI-7045 reflection now auto-initializes selfType
selfType joins the happy family of flags, annotations and privateWithin, which automatically trigger initialization, when used within runtime reflection.
Diffstat (limited to 'test/files/run/t7045.scala')
-rw-r--r--test/files/run/t7045.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t7045.scala b/test/files/run/t7045.scala
new file mode 100644
index 0000000000..f41baca05e
--- /dev/null
+++ b/test/files/run/t7045.scala
@@ -0,0 +1,12 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+
+class C
+class D { self: C => }
+
+object Test extends App {
+ val d = cm.staticClass("D")
+ println(d.selfType)
+ d.typeSignature
+ println(d.selfType)
+} \ No newline at end of file