Closed
Description
Following code passes type checking in dotty:
object Test {
def foo(x: Option[Int]) = x match {
case Some(_: Double) => true
case None => true
}
}
In scalac it generates following error message:
error: scrutinee is incompatible with pattern type;
found : Double
required: Int
case Some(_: Double) => true
^
one error found
Metadata
Metadata
Assignees
Labels
No labels