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.
20 lines
304 B
Kotlin
Vendored
20 lines
304 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// IGNORE_LIGHT_ANALYSIS
|
|
// WITH_RUNTIME
|
|
// !INHERIT_MULTIFILE_PARTS
|
|
|
|
// FILE: test.kt
|
|
|
|
@file:JvmMultifileClass
|
|
@file:JvmName("Test")
|
|
|
|
internal fun <T> List<T>.first(): T = get(0)
|
|
|
|
fun test(): String {
|
|
return listOf("OK").first()
|
|
}
|
|
|
|
// FILE: box.kt
|
|
|
|
fun box(): String = test()
|