summaryrefslogtreecommitdiff
path: root/test/files/run
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-02-11 19:18:29 +0100
commit07bcb6176ac7836e81ec7c849e1140126bb6b327 (patch)
treed6c87a73514d89050f36e1d883670e35299949a8 /test/files/run
parentbebd62d5665b9166c1a44b3bcdc01287220a30b7 (diff)
downloadscala-07bcb6176ac7836e81ec7c849e1140126bb6b327.tar.gz
scala-07bcb6176ac7836e81ec7c849e1140126bb6b327.tar.bz2
scala-07bcb6176ac7836e81ec7c849e1140126bb6b327.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')
-rw-r--r--test/files/run/t7045.check2
-rw-r--r--test/files/run/t7045.scala12
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t7045.check b/test/files/run/t7045.check
new file mode 100644
index 0000000000..28134535c8
--- /dev/null
+++ b/test/files/run/t7045.check
@@ -0,0 +1,2 @@
+D with C
+D with C
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