mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 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.
14 lines
168 B
Kotlin
Vendored
14 lines
168 B
Kotlin
Vendored
fun foo() = "OK"
|
|
|
|
fun box(): String {
|
|
val x = ::foo
|
|
|
|
var r = x()
|
|
if (r != "OK") return r
|
|
|
|
r = run(::foo)
|
|
if (r != "OK") return r
|
|
|
|
return "OK"
|
|
}
|