blob: d446caa91a03cd528affc820be463a08551cdd38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
scala> {
import scala.reflect.runtime.universe._
val x = "2"
val tt = implicitly[TypeTag[x.type]]
println(tt)
}
<console>:15: free term: Ident(TermName("x")) defined by res0 in <console>:14:7
val tt = implicitly[TypeTag[x.type]]
^
TypeTag[x.type]
scala> :quit
|