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
classA { classB }
vala1=newAvala2=newAvalb:Any=new a1.B
b match {
case_: a2.B=> println("match")
case _ => println("no match")
}
classX { classY[Q] }
valx1=newXvalx2=newXvaly:Any=new x1.Y[Int]
y match {
case_: x2.Y[_] => println("match")
case _ => println("no match")
}
Output
no matchmatch
Expectation
no match
no match
Whether or not an inner class is polymorphic shouldn't make a difference here. This behavior also differs from Scala 2. As far as I can see in the commit history this change doesn't seem to be a conscious decision.
The text was updated successfully, but these errors were encountered:
Compiler version
3.0.1
Minimized code
Output
Expectation
Whether or not an inner class is polymorphic shouldn't make a difference here. This behavior also differs from Scala 2. As far as I can see in the commit history this change doesn't seem to be a conscious decision.
The text was updated successfully, but these errors were encountered: