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
both Scala 2.12.20 and Scala 3.6.3 give an unreachable warning but Scala 2.13 does not:
traitTreeobjectTree {
defunapply(tree: Tree):Some[Int] =???
}
objectTest {
deffoo(tree: Tree) =
tree match {
caseTree(_) =>???case _ =>"unreachable"
}
}
note that adding a case null => ??? line does causes the unreachable warning to emerge
the Scala 3 warning text is helpfully explicit about the status of null:
-- [E121] Pattern Match Warning: -----------------------------------------------
9 | case _ => "unreachable"
| ^
|Unreachable case except for null (if this is intentional, consider writing case null => instead).
The text was updated successfully, but these errors were encountered:
both Scala 2.12.20 and Scala 3.6.3 give an unreachable warning but Scala 2.13 does not:
note that adding a
case null => ???
line does causes the unreachable warning to emergethe Scala 3 warning text is helpfully explicit about the status of
null
:The text was updated successfully, but these errors were encountered: