diff options
Diffstat (limited to 'test/files/run/reflection-idtc.scala')
-rw-r--r-- | test/files/run/reflection-idtc.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/reflection-idtc.scala b/test/files/run/reflection-idtc.scala new file mode 100644 index 0000000000..bbe90f6826 --- /dev/null +++ b/test/files/run/reflection-idtc.scala @@ -0,0 +1,16 @@ +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 idsym = tb.typecheck(q"type Id[X] = X").symbol.asType + val idTC1 = idsym.typeSignature + println(idTC1) + println(appliedType(idTC1, List(typeOf[Int]))) + println("===") + val idTC2 = idsym.toType.etaExpand + println(idTC2) + println(appliedType(idTC2, List(typeOf[Int]))) + println(appliedType(idTC2, List(typeOf[Int])).dealias) +}
\ No newline at end of file |