KT-622 Add when without condition. (Only changes for parsing were added. A special task for semantic level is KT-657)

This commit is contained in:
Nikolay Krasko
2011-11-29 12:48:08 +04:00
parent e787d94b96
commit 84cb0a179a
5 changed files with 166 additions and 14 deletions
+11
View File
@@ -70,3 +70,14 @@ fun foo() {
is a.a @ (val b, b) => c
}
}
fun whenWithoutCondition(i : Int) {
val j = 12
when {
3 => -1
i == 3 => -1
j < i, j == i => -1
i is Int => 1
else => 2
}
}