[FIR] Create test case to validate KT-56988 is working as expected
^KT-56988 Fixed
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
// FIR_DUMP
|
||||
|
||||
fun Int?.swap(): Int = 1
|
||||
fun Int.swap(): Int? = null
|
||||
|
||||
var result = false
|
||||
|
||||
fun b(): Boolean {
|
||||
result = !result
|
||||
return result
|
||||
}
|
||||
|
||||
fun test() {
|
||||
var x: Int? = 1
|
||||
if (x != null) {
|
||||
while (b()) {
|
||||
val tmp = x.swap()
|
||||
x = tmp
|
||||
}
|
||||
x.plus(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user