|
|
|
|
|
by platz
3889 days ago
|
|
are non-exhaustive pattern matches in kotlin warnings, errors, or neither? looks like from the docs: "If `when` is used as an expression, the `else` branch is mandatory, unless the compiler can prove that all possible cases are covered with branch conditions." So it is an error, I assume? |
|
> What about pattern matching? This is where the word “sealed” above comes in handy; we can do an exhaustive pattern match without an else/otherwise branch
from https://medium.com/@octskyward/kotlin-fp-3bf63a17d64a#.8dbwa...