Closed
Description
Compiler version
3.*
Minimized code
object PartialFunctionNoWarning {
// nice warning
"abc" match {
case "abc" =>
case "abc" =>
}
// no warnings
val pf: PartialFunction[String, Unit] = {
case "abc" =>
case "abc" =>
}
}
Output
"unreachable code" when using match
.
Expectation
"unreachable code" shows when using partial function syntax too.
In scala 2 it does show a warning.