Sorry if this has already been addressed, but is it possible to eliminate the
condition is always true
warning for a final
when
clause? Here's an example:
Copy code
when { // This is flagged as requiring the else clause
myInt < CONSTANT_INT -> {}
myInt > CONSTANT_INT -> {}
myInt == CONSTANT_INT -> {} // This is flagged with an 'always true' warning
}
Is it possible to determine that this
when
is actually complete (as when covering all algebraic type cases) instead of demanding the
else
syntax?
Edit: To be clear, I'm curious about whether this is feasible as a language feature.