christoph.pickl
04/10/2017, 7:32 PMwhen which bothers me a bit...
so this is OK:
val result = resultOfBigCalculation()
when (result) {
is SomeResult -> result.propertyOfSomeResult // smart cast FTW
}
but this doesnt seem to work in kotlin, right? or am i missing something...? any idea would be much appreciated 🙂
when (resultOfBigCalculation()) {
is SomeResult -> it.propertyOfSomeResult // no "it" available or other means to access the result
}