jtravis
03/01/2018, 11:15 PMwhen
exhaustively when looking through some sealed classes, but there is no real result from each of the when
clauses. The best I can currently do appears to be below:
val someVariableThatDoesntDoAnything = when(some) {
is FirstClass -> {}
is SecondClass -> {}
}
It seems like it would be nice to allow val _ = when(some) { ... }
neworldlt
03/02/2018, 8:12 AMwhen (some) {
is FirstClass -> {}
us SecondClass -> {}
}.javaClass
It enforces exhaustivelydsavvinov
03/02/2018, 12:08 PM