mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +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.
15 lines
256 B
Kotlin
Vendored
15 lines
256 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
import kotlin.test.assertEquals
|
|
|
|
fun foo(): Int {
|
|
return 1
|
|
// val xyz has empty live range because everything after return will be removed as dead
|
|
val xyz = 1
|
|
}
|
|
|
|
fun box(): String {
|
|
assertEquals(1, foo())
|
|
return "OK"
|
|
}
|