[FIR] Create test case to validate KT-56988 is working as expected

^KT-56988 Fixed
This commit is contained in:
Brian Norman
2024-03-08 09:37:13 -06:00
committed by Space Team
parent b839e2680e
commit c6c0abae82
8 changed files with 102 additions and 0 deletions
@@ -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)
}
}