KT-621 Remove .foo() pattern matching from when (Some tests were rewritten)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user