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
(null:Any) match {
casex: AnyRefiffalse=>caselist: Option[Int] =>caseproduct: Product=>// change Product to String and it's all good
}
due to the way the subtyping relations are rendered as boolean propositions, we get a contradiction, and the error shows up in an unexpected case:
[adriaan@lampmac13 scala (topic/virtpatmat-dev)]$ qs -Ypatmat-debug
Welcome to Scala version 2.10.0-20120705-095737-584eeecd82 (JavaHotSpot(TM) 64-BitServerVM, Java1.6.0_33).
Type in expressions to have them evaluated.
Type:help for more information.
scala> (null:Any) match {
|casex: AnyRefiffalse=>// has to be AnyRef|caselist: Option[Int] =>// has to be a product-derived class|caseproduct: Product=>// apparently Product is not a subtype of AnyRef (or AnyVal)| }
<snip>
NOTexcludes: (Product,Option[_])
excludes : (Product,Product,AnyRef,AnyRef,false,false,false,false)
excludes : (Product,Product,null,Null(null),false,false,true,true)
eq axioms for:Product
excluded:List(V1=AnyRef#2, V1=null#1)
implied:List()
NOTexcludes: (Option[_],Product)
NOTexcludes: (Option[_],AnyRef)
excludes : (Option[_],Option[_],null,Null(null),false,false,true,true)
eq axioms for:Option[_]
excluded:List(V1=null#1)
implied:List(V1=Product#4, V1=AnyRef#2)
NOTexcludes: (AnyRef,Option[_])
excludes : (AnyRef,AnyRef,null,Null(null),false,false,true,true)
eq axioms for:AnyRef
excluded:List(V1=null#1)
implied:List()
eq axioms for:null
excluded:List()
implied:List()
The text was updated successfully, but these errors were encountered:
due to the way the subtyping relations are rendered as boolean propositions, we get a contradiction, and the error shows up in an unexpected case:
The text was updated successfully, but these errors were encountered: