You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objectUnchecked {
defnowarn[T] = (null:Any) match { case_: Some[T] => }
defwarn1[T] = (null:Any) match { case_: T=> }
defwarn2= (null:Any) match { case_: Some[String] => }
}
See matchesPattern
/** Is this type a subtype of that type in a pattern context? * Dummy type arguments on the right hand side are replaced with * fresh existentials, except for Arrays. * * See bug1434.scala for an example of code which would fail * if only a <:< test were applied.*/defmatchesPattern(that: Type):Boolean= (this<:< that) || (that match {
caseArrayTypeRef(elem2) if elem2.typeConstructor.isHigherKinded =>thismatch {
caseArrayTypeRef(elem1) => elem1 matchesPattern elem2
case _ =>false
}
caseTypeRef(_, sym, args) =>valthat1= existentialAbstraction(args map (_.typeSymbol), that)
(that ne that1) && (this<:< that1) && {
debuglog(s"$this.matchesPattern($that) depended on discarding args and testing <:< $that1")
true
}
case _ =>false
})
See
matchesPattern
And from the sounds of the comment, #1434
The text was updated successfully, but these errors were encountered: