blob: cbb21854ba7137fceefcfdf0bdbab32e3ea16052 (
plain) (
tree)
|
|
scala> def foo[T]{
import scala.reflect.runtime.universe._
val tt = implicitly[WeakTypeTag[List[T]]]
println(tt)
}
<console>:13: free type: Ident(TypeName("T")) defined by foo in <console>:11:16
val tt = implicitly[WeakTypeTag[List[T]]]
^
foo: [T]=> Unit
scala> foo[Int]
WeakTypeTag[scala.List[T]]
scala> :quit
|