https://kotlinlang.org logo
d

dsavvinov

12/22/2017, 10:12 PM
I'd like to add, that, still, forced-exhaustive
when
can be quite nice in some use-cases, and we're aware of that. It's just not the first-priority feature currently.
👍 4
n

natpryce

12/23/2017, 12:02 AM
Forced-exhaustive when statements can be implemented as a no-op extension function of Unit. That makes the compiler see the
when
as an expression that evaluates to Unit, and so check for exhaustiveness.
2 Views