Files
kotlin-fork/compiler/testData/codegen/box/arrays/kt17134.kt
T
vladislav.grechko f32367d2c2 Fix IrFunction.isEmptyArray implementation
The previous one was incorrect for K1 since parent of top-level function
is `IrClass`, not `IrPackageFragment`.

The change is non-functional, K1 still worked correctly, but had to do
some extra work when inlining `emptyArray` calls and produces less
performant bytecode.
2024-02-22 07:32:36 +00:00

16 lines
257 B
Kotlin
Vendored

// WITH_STDLIB
// TARGET_BACKEND: JVM
object A {
@JvmStatic fun main(args: Array<String>) {
val b = arrayOf(arrayOf(""))
object {
val c = b[0]
}
}
}
fun box(): String {
A.main(emptyArray())
return "OK"
}