4 ms·
In Scala or OCaml you get a compile-time warning + runtime error. In Java 14, Kotlin and Rust there is a compile-time error if switch/match expression is non-e
by pkolaczk 6y ago
In Scala or OCaml you get a compile-time warning + runtime error. In Java 14, Kotlin and Rust there is a compile-time error if switch/match expression is non-exhaustive.
- lmm 6y agoYou don't get a compile-time warning in Scala, only a runtime error. https://scastie.scala-lang.org/6fGnDSzDSdmI4USN5k9OTA https://scastie.scala-lang.org/6fGnDSzDSdmI4USN5k9OTA