KT-621 Remove .foo() pattern matching from when (Some tests were rewritten)

This commit is contained in:
Nikolay Krasko
2011-11-25 17:39:16 +04:00
parent 0b689f32a7
commit 0c758902ef
21 changed files with 256 additions and 294 deletions
@@ -2,8 +2,11 @@ class C(val p: Boolean) { }
fun box(): String {
val c = C(true)
return when(c) {
.p => "OK"
else => "fail"
}
// Commented for KT-621
// return when(c) {
// .p => "OK"
// else => "fail"
// }
return if (c.p) "OK" else "fail"
}