[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.
This commit is contained in:
committed by
Alexander Udalov
parent
3d2f5f4bc1
commit
7b4e0b2f5d
@@ -0,0 +1,13 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// WITH_RUNTIME
|
||||
// FILE: u1.kt
|
||||
|
||||
object O {
|
||||
@JvmStatic
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
// FILE: u2.kt
|
||||
|
||||
fun box() = (O::foo)()
|
||||
Reference in New Issue
Block a user