blob: a75859951517b068c15182505ce143d4d42d1b24 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import scala.reflect.base.{Universe => BaseUniverse}
import scala.reflect.{basis => rb}
import scala.reflect.runtime.{universe => ru}
object Test extends App {
println(rb.typeOf[List[Int]])
println(ru.typeOf[List[Int]])
def foo[T: rb.TypeTag] = {
println(rb.typeOf[T])
println(ru.typeOf[T])
println(implicitly[BaseUniverse#TypeTag[T]])
}
foo[Map[String, String]]
}
|