Multiple conditions in when entries

This commit is contained in:
Andrey Breslav
2011-07-06 19:36:09 +04:00
parent b621e89396
commit d1b8a6b5c7
5 changed files with 54 additions and 13 deletions
@@ -0,0 +1,8 @@
fun set(key : String, value : String) {
val a : String? = ""
when (a) {
"" => a<error>.</error>get(0)
is String, is Any => a.compareTo("")
else => a.toString()
}
}