blob: c006cb7ffbb7caec3ebf5555786cdb5b8b857d37 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Type in expressions to have them evaluated.
Type :help for more information.
scala>
scala> def foo[T]{
import scala.reflect.runtime.universe._
val tt = implicitly[AbsTypeTag[List[T]]]
println(tt)
}
<console>:9: free type: Ident(newTypeName("T")) defined by foo in <console>:7:16
val tt = implicitly[AbsTypeTag[List[T]]]
^
foo: [T]=> Unit
scala> foo[Int]
AbsTypeTag[scala.List[T]]
scala>
scala>
|