diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t6047.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t6047.scala | 20 |
2 files changed, 21 insertions, 0 deletions
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 |