diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-02-07 09:14:42 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-10-18 17:48:51 +0200 |
commit | 544ae248aabaf919294f2aa375ebbd92b1c8757d (patch) | |
tree | 7a007e9103d68c8b6ee123d98cc4a39d33e5ed32 /test | |
parent | d05566ca327103d61b071a5022be98f1f3f045f3 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/t7045.check | 2 | ||||
-rw-r--r-- | test/files/run/t7045.scala | 12 |
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 |