9dd8eda1c9
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.
10 lines
239 B
Kotlin
Vendored
10 lines
239 B
Kotlin
Vendored
// KJS_WITH_FULL_RUNTIME
|
|
//WITH_RUNTIME
|
|
|
|
fun foo(x: String, ys: List<String>) =
|
|
x + ys.fold("", { a, b -> a + b })
|
|
|
|
var flag = true
|
|
|
|
fun box(): String =
|
|
foo("O", if (flag) listOf("k").map { it.toUpperCase() } else listOf()) |