blob: 5c4130ad6da1650ffb27dc9717d2090a43da0146 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import scala.reflect.{ArrayTag, arrayTag}
import scala.reflect.{ClassTag, classTag}
object Test extends App {
def arrayTagIsnotManifest[T: ArrayTag] = {
println(manifest[T])
}
arrayTagIsnotManifest[Int]
arrayTagIsnotManifest[String]
arrayTagIsnotManifest[Array[Int]]
def classTagIsnotManifest[T: ClassTag] = {
println(manifest[T])
}
classTagIsnotManifest[Int]
classTagIsnotManifest[String]
classTagIsnotManifest[Array[Int]]
}
|