Add tests for obsolete issues
(Test for KT-37331 is added to multiplatform/defaultArguments/suspend.kt.) #KT-30080 #KT-33641 #KT-36237 #KT-36952 #KT-37331 #KT-38920 #KT-39256 #KT-42415 #KT-44636 #KT-45704 #KT-47084 #KT-47894
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
fun box(): String {
|
||||
val x = Result.success(42)
|
||||
var y = 0
|
||||
when (x) {
|
||||
Result.success(42) -> {
|
||||
y++
|
||||
}
|
||||
else -> {
|
||||
y -= 10
|
||||
}
|
||||
}
|
||||
when (val z = Result.success(42)) {
|
||||
Result.success(42) -> {
|
||||
y++
|
||||
}
|
||||
else -> {
|
||||
y -= 100
|
||||
}
|
||||
}
|
||||
return if (y == 2) "OK" else "Fail $y"
|
||||
}
|
||||
Reference in New Issue
Block a user