scala.reflect.TypeTest
See theTypeTest companion object
trait TypeTest[-S, T] extends Serializable
A TypeTest[S, T]
contains the logic needed to know at runtime if a value of type S
is an instance of T
.
If a pattern match is performed on a term of type s: S
that is uncheckable with s.isInstanceOf[T]
and the pattern is one of the following forms:
t: T
t @ X()
whereX.unapply
takes an argument of typeT
then a given instance ofTypeTest[S, T]
is summoned and used to perform the test.
Attributes
- Companion
- object
- Source
- TypeTest.scala
- Graph
-
- Supertypes
Members list
In this article