From 4dc3a3319705ba9cdf63978bbed9a2fc8051b34f Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Fri, 31 May 2013 23:03:25 +0200 Subject: SI-7375 ClassTag for value class aliases reifyRuntimeClass now always dealiases its argument prior to processing. --- test/files/run/t7375b/Macros_1.scala | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/files/run/t7375b/Macros_1.scala (limited to 'test/files/run/t7375b/Macros_1.scala') diff --git a/test/files/run/t7375b/Macros_1.scala b/test/files/run/t7375b/Macros_1.scala new file mode 100644 index 0000000000..70e79cc2b4 --- /dev/null +++ b/test/files/run/t7375b/Macros_1.scala @@ -0,0 +1,18 @@ +import language.experimental.macros +import scala.reflect.macros.Context + +class C1(val n: Int) extends AnyVal +class C2(val n: Int) extends AnyRef + +object Macros { + type F1 = C1 + type F2 = C2 + + def foo = macro impl + def impl(c: Context) = { + import c.universe._ + def test[T: c.TypeTag] = reify(println(c.literal(c.reifyRuntimeClass(c.typeOf[T]).toString).splice)).tree + def tests = Block(List(test[C1], test[C2], test[F1], test[F2]), Literal(Constant(()))) + c.Expr[Unit](tests) + } +} \ No newline at end of file -- cgit v1.2.3