From ea47260be5daf873ff30234d23732f7732d56d1b Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Tue, 17 Jul 2012 11:58:56 +0200 Subject: test case closes SI-6047 The bug is not reproducible both in M4 and in M5. --- test/files/pos/t6047.flags | 1 + test/files/pos/t6047.scala | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/files/pos/t6047.flags create mode 100644 test/files/pos/t6047.scala (limited to 'test/files/pos') diff --git a/test/files/pos/t6047.flags b/test/files/pos/t6047.flags new file mode 100644 index 0000000000..cd66464f2f --- /dev/null +++ b/test/files/pos/t6047.flags @@ -0,0 +1 @@ +-language:experimental.macros \ No newline at end of file diff --git a/test/files/pos/t6047.scala b/test/files/pos/t6047.scala new file mode 100644 index 0000000000..66b52b285f --- /dev/null +++ b/test/files/pos/t6047.scala @@ -0,0 +1,20 @@ +import scala.reflect.makro.Context +import java.io.InputStream + +object Macros { + def unpack[A](input: InputStream): A = macro unpack_impl[A] + + def unpack_impl[A: c.TypeTag](c: Context)(input: c.Expr[InputStream]): c.Expr[A] = { + import c.universe._ + + def unpackcode(tpe: c.Type): c.Expr[_] = { + if (tpe <:< implicitly[c.AbsTypeTag[Traversable[_]]].tpe) { + + } + ??? + } + + unpackcode(c.typeOf[A]) + ??? + } + } \ No newline at end of file -- cgit v1.2.3