JVM_IR: add coercion for index in ArrayGet intrinsic
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun test(ix: Int?): String {
|
||||
val arr = arrayOf("fail 1")
|
||||
|
||||
if (ix != null) {
|
||||
arr[ix] = "OK"
|
||||
return arr[ix]
|
||||
}
|
||||
return "fail 2"
|
||||
}
|
||||
|
||||
fun box() = test(0)
|
||||
|
||||
Reference in New Issue
Block a user