Type reference (allowed for classOf[], is/asInstanceOf[]).
A TypeRef has exactly the same level of precision as a JVM type.
There is a one-to-one relationship between a TypeRef and an instance of
java.lang.Class at run-time. This means that:
All primitive types have their TypeRef (including scala.Byte and
scala.Short), and they are different from their boxed versions.
Raw JS types are not erased to any
Array types are like on the JVM
A TypeRef therefore uniquely identifies a classOf[T]. It is also the
type refs that are used in method signatures, and which therefore dictate
JVM/IR overloading.
Type reference (allowed for classOf[], is/asInstanceOf[]).
A
TypeRef
has exactly the same level of precision as a JVM type. There is a one-to-one relationship between aTypeRef
and an instance ofjava.lang.Class
at run-time. This means that:TypeRef
(includingscala.Byte
andscala.Short
), and they are different from their boxed versions.any
A
TypeRef
therefore uniquely identifies aclassOf[T]
. It is also the type refs that are used in method signatures, and which therefore dictate JVM/IR overloading.