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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user