We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cfd858 commit ea47260Copy full SHA for ea47260
test/files/pos/t6047.flags
@@ -0,0 +1 @@
1
+-language:experimental.macros
test/files/pos/t6047.scala
@@ -0,0 +1,20 @@
+import scala.reflect.makro.Context
2
+import java.io.InputStream
3
+
4
+object Macros {
5
+ def unpack[A](input: InputStream): A = macro unpack_impl[A]
6
7
+ def unpack_impl[A: c.TypeTag](c: Context)(input: c.Expr[InputStream]): c.Expr[A] = {
8
+ import c.universe._
9
10
+ def unpackcode(tpe: c.Type): c.Expr[_] = {
11
+ if (tpe <:< implicitly[c.AbsTypeTag[Traversable[_]]].tpe) {
12
13
+ }
14
+ ???
15
16
17
+ unpackcode(c.typeOf[A])
18
19
20
0 commit comments