Description
minimized code
Tried with dotr in Dotty compiler version 0.17.0-RC1
.
def isAType(arg: String): Unit = arg match {
case _ : "a" => println("This is `a` type")
case _ => println("not `a`")
}
isAType("a")
//This is `a` type
isAType(new String("a"))
//This is `a` type
new String("a").isInstanceOf["a"]
//val res0: Boolean = false
expectation
new String("a")
should not match with case _ : "a"
as it doesn't with isInstanceOf
.