-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
Чтобы можно было так:
private fun moo(mo: String) = when (mo) {
"you",
"and",
"me" -> true
else -> false
}
private fun foo() =
try {
if ("ohhh" == "you touch my talalam") {
throw IllegalStateException("It's din din dong")
}
"magic"
} catch (e: Exception) {
println("ta talala talalalala")
"the gathering"
}
Сейчас можно только так:
private fun moo(mo: String): Any {
return when (mo) {
"you",
"and",
"me" -> true
else -> false
}
}
private fun foo(): String {
return try {
if ("ohhh" == "you touch my talalam") {
throw IllegalStateException("It's din din dong")
}
"magic"
} catch (e: Exception) {
println("ta talala talalalala")
"the gathering"
}
}
mrblrrd and PilotOfSparrowJeevuz