blob: ec69c1460a785a3c4dffd114a23c81c4c1c6e2a0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
import scala.reflect.runtime.universe._
import scala.reflect.ClassTag
object Test extends App {
def typeTagWithoutClassTagIsnotManifest[T: TypeTag] = {
println(manifest[T])
}
typeTagWithoutClassTagIsnotManifest[Int]
typeTagWithoutClassTagIsnotManifest[String]
typeTagWithoutClassTagIsnotManifest[Array[Int]]
}
|