mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Library methods such as 'listOf' are resolved to have the package fragments as their parents, but JVM expects their containing file classes as parents. This fix generates those file classes and uses them as parent replacements for such library methods.
12 lines
241 B
Kotlin
Vendored
12 lines
241 B
Kotlin
Vendored
// KJS_WITH_FULL_RUNTIME
|
|
// WITH_RUNTIME
|
|
|
|
val arr = intArrayOf()
|
|
|
|
fun box(): String {
|
|
val s = StringBuilder()
|
|
for ((index, x) in arr.withIndex()) {
|
|
return "Loop over empty array should not be executed"
|
|
}
|
|
return "OK"
|
|
} |