From 5984461227c70dd48d9c87c6e5afe0cf8c58f8f1 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Fri, 14 Feb 2014 11:06:01 -0800 Subject: SI-8177 tidy up in type reification --- test/files/neg/t8104/Test_2.scala | 2 +- test/files/run/t6992.check | 1 + test/files/run/t6992/Test_2.scala | 4 +++- test/files/run/t8104.check | 3 ++- test/files/run/t8104/Test_2.scala | 5 ++++- 5 files changed, 11 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/files/neg/t8104/Test_2.scala b/test/files/neg/t8104/Test_2.scala index 585f76c00f..a3bd940188 100644 --- a/test/files/neg/t8104/Test_2.scala +++ b/test/files/neg/t8104/Test_2.scala @@ -9,7 +9,7 @@ object Test extends App { case class C(x: Int, y: Int) import scala.reflect.runtime.universe._ - def reprify[T, Repr](x: T)(implicit generic: Generic.Aux[T, Repr], tag: TypeTag[Repr]) = println(tag) + def reprify[T, Repr](x: T)(implicit generic: Generic.Aux[T, Repr], tag: WeakTypeTag[Repr]) = println(tag) reprify(C(40, 2)) // this is a compilation error at the moment as explained in SI-8104 diff --git a/test/files/run/t6992.check b/test/files/run/t6992.check index 1a0684c995..021f32ec95 100644 --- a/test/files/run/t6992.check +++ b/test/files/run/t6992.check @@ -1,3 +1,4 @@ +Test.foo.T Int 42 42 diff --git a/test/files/run/t6992/Test_2.scala b/test/files/run/t6992/Test_2.scala index 0f226b01ce..1ed8958d38 100644 --- a/test/files/run/t6992/Test_2.scala +++ b/test/files/run/t6992/Test_2.scala @@ -2,7 +2,9 @@ import scala.language.reflectiveCalls object Test extends App { val foo = Macros.foo("T") - println(scala.reflect.runtime.universe.weakTypeOf[foo.T]) + val ttpe = scala.reflect.runtime.universe.weakTypeOf[foo.T] + println(ttpe) + println(ttpe.typeSymbol.typeSignature) val bar = Macros.bar("test") println(bar.test) diff --git a/test/files/run/t8104.check b/test/files/run/t8104.check index c2593eb199..40523a2868 100644 --- a/test/files/run/t8104.check +++ b/test/files/run/t8104.check @@ -1 +1,2 @@ -TypeTag[(Int, Int)] +WeakTypeTag[.this.Repr] +(Int, Int) diff --git a/test/files/run/t8104/Test_2.scala b/test/files/run/t8104/Test_2.scala index 630176f175..55c080a563 100644 --- a/test/files/run/t8104/Test_2.scala +++ b/test/files/run/t8104/Test_2.scala @@ -9,7 +9,10 @@ object Test extends App { case class C(x: Int, y: Int) import scala.reflect.runtime.universe._ - def reprify[T, Repr](x: T)(implicit generic: Generic.Aux[T, Repr], tag: TypeTag[Repr]) = println(tag) + def reprify[T, Repr](x: T)(implicit generic: Generic.Aux[T, Repr], tag: WeakTypeTag[Repr]) = { + println(tag) + println(tag.tpe.typeSymbol.typeSignature) + } reprify(C(40, 2)) implicitly[Generic.Aux[C, (Int, Int)]] -- cgit v1.2.3