These are chat archives for JetBrains/kotlin

Aug 2017
Ilya Saunkin
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
Aug 17 2017 09:03
when(someObject) { 
    null -> throw Exception()
    else(thatObject) -> thatObject.use()
Manish Giri
Aug 17 2017 20:20
just starting to learn kotlin