These are chat archives for JetBrains/kotlin

17th
Aug 2017
Ilya Saunkin
@esaounkine
Aug 17 2017 08:54
hey guys, sorry for a probable dupe, but I can't find anything online, is there a way to have reference to the condition object inside of when clause?
pretty much like they do in Scala, something among the lines:
Ilya Saunkin
@esaounkine
Aug 17 2017 09:03
when(someObject) { 
    null -> throw Exception()
    else(thatObject) -> thatObject.use()
}
Manish Giri
@Manish-Giri
Aug 17 2017 20:20
Hello
just starting to learn kotlin