File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
docs/docs/reference/other-new-features
library/src/scala/reflect Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ TypeTest
1010` TypeTest.unapply ` will return ` Some(x.asInstanceOf[Y]) ` if ` x ` conforms to ` Y ` , otherwise it returns ` None ` .
1111
1212``` scala
13- trait TypeTest [S , T <: S ] extends Serializable {
13+ trait TypeTest [- S , T ] extends Serializable {
1414 def unapply (s : S ): Option [s.type & T ]
1515}
1616```
Original file line number Diff line number Diff line change 11package scala .reflect
22
3- /** A `TypeTest[S, T]` (where `T <: S`) contains the logic needed to know at runtime if a value of
3+ /** A `TypeTest[S, T] contains the logic needed to know at runtime if a value of
44 * type `S` can be downcased to `T`.
55 *
66 * If a pattern match is performed on a term of type `s: S` that is uncheckable with `s.isInstanceOf[T]` and
@@ -12,7 +12,7 @@ package scala.reflect
1212 * Note: This is replacemet for `ClassTag.unapply` that can be sound for path dependent types
1313 */
1414@ scala.annotation.implicitNotFound(msg = " No TypeTest available for [${S}, ${T}]" )
15- trait TypeTest [S , T <: S ] extends Serializable {
15+ trait TypeTest [- S , T ] extends Serializable {
1616
1717 /** A TypeTest[S, T] can serve as an extractor that matches only S of type T.
1818 *
You can’t perform that action at this time.
0 commit comments