File tree 2 files changed +2
-2
lines changed
_docs/reference/other-new-features
_spec/TODOreference/other-new-features
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ We could create a type test at call site where the type test can be performed wi
63
63
val tt : TypeTest [Any , String ] =
64
64
new TypeTest [Any , String ]:
65
65
def unapply (s : Any ): Option [s.type & String ] = s match
66
- case s : String => Some (s )
66
+ case q : (s. type & String ) => Some (q )
67
67
case _ => None
68
68
69
69
f[AnyRef , String ](" acb" )(using tt)
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ We could create a type test at call site where the type test can be performed wi
63
63
val tt : TypeTest [Any , String ] =
64
64
new TypeTest [Any , String ]:
65
65
def unapply (s : Any ): Option [s.type & String ] = s match
66
- case s : String => Some (s )
66
+ case q : (s. type & String ) => Some (q )
67
67
case _ => None
68
68
69
69
f[AnyRef , String ](" acb" )(using tt)
You can’t perform that action at this time.
0 commit comments