Files
kotlin-fork/compiler/testData/codegen/box/jvmStatic/functionReference.kt
T
Mads Ager 7b4e0b2f5d [JVM_IR] Deal with lowering ordering issues for JvmStatic function references.
Do not destructively update the @JvmStatic function, instead
create a copy on first access, and replace the original with
the copy in the jvm static lowering. This ensures that the original
function is seen in other lowerings independently of file lowering
order.
2020-11-18 17:13:00 +01:00

14 lines
145 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: u1.kt
object O {
@JvmStatic
fun foo() = "OK"
}
// FILE: u2.kt
fun box() = (O::foo)()