Skip to content

Commit ea47260

Browse files
committed
test case closes SI-6047
The bug is not reproducible both in M4 and in M5.
1 parent 0cfd858 commit ea47260

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

test/files/pos/t6047.flags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-language:experimental.macros

test/files/pos/t6047.scala

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
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

Comments
 (0)