K2: generate Unit conversion for indexed assignment at raw FIR stage
#KT-59748 Fixed
This commit is contained in:
committed by
Space Team
parent
1832413a02
commit
f20e2dec31
@@ -0,0 +1,14 @@
|
||||
// ISSUE: KT-59748
|
||||
// WITH_STDLIB
|
||||
|
||||
fun foo(list: MutableList<Any?>, condition: Boolean): Unit = when {
|
||||
condition -> list[0] = "OK"
|
||||
else -> Unit
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val list = mutableListOf<Any?>("FAIL")
|
||||
foo(list, true)
|
||||
foo(list, false)
|
||||
return list[0] as String
|
||||
}
|
||||
Reference in New Issue
Block a user