From 07bcb6176ac7836e81ec7c849e1140126bb6b327 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Thu, 7 Feb 2013 09:14:42 +0100 Subject: 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. --- test/files/run/t7045.check | 2 ++ test/files/run/t7045.scala | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/files/run/t7045.check create mode 100644 test/files/run/t7045.scala (limited to 'test/files/run') 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 -- cgit v1.2.3