blob: 16895a449e8fe39a350dc6d57ec32fcb138c18e1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import scala.reflect.mirror._
object Test extends App {
class C {
type T
implicit val tt: TypeTag[T] = implicitly[TypeTag[Int]].asInstanceOf[TypeTag[T]]
val code = reify {
List[T](2.asInstanceOf[T])
}
println(code.eval)
}
new C { type T = String } // this "mistake" is made for a reason!
}
|