diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t5418a.check | 1 | ||||
-rw-r--r-- | test/files/run/t5418a.scala | 3 | ||||
-rw-r--r-- | test/files/run/t5418b.check | 2 | ||||
-rw-r--r-- | test/files/run/t5418b.scala | 11 |
4 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/t5418a.check b/test/files/run/t5418a.check new file mode 100644 index 0000000000..ee0e80e11f --- /dev/null +++ b/test/files/run/t5418a.check @@ -0,0 +1 @@ +Expr[Class[_ <: java.lang.Object]](new Object().getClass())
diff --git a/test/files/run/t5418a.scala b/test/files/run/t5418a.scala new file mode 100644 index 0000000000..90bc542be6 --- /dev/null +++ b/test/files/run/t5418a.scala @@ -0,0 +1,3 @@ +object Test extends App { + println(scala.reflect.runtime.universe.reify(new Object().getClass)) +}
\ No newline at end of file diff --git a/test/files/run/t5418b.check b/test/files/run/t5418b.check new file mode 100644 index 0000000000..875ad08435 --- /dev/null +++ b/test/files/run/t5418b.check @@ -0,0 +1,2 @@ +new Object().getClass()
+TypeRef(ThisType(java.lang), java.lang.Class, List(TypeRef(NoPrefix, newTypeName("?0"), List())))
diff --git a/test/files/run/t5418b.scala b/test/files/run/t5418b.scala new file mode 100644 index 0000000000..08e8bb163b --- /dev/null +++ b/test/files/run/t5418b.scala @@ -0,0 +1,11 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends App { + val tb = cm.mkToolBox() + val untyped = reify(new Object().getClass).tree + val typed = tb.typeCheck(untyped) + println(typed) + println(showRaw(typed.tpe)) +}
\ No newline at end of file |