[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:
Mads Ager
2020-11-04 15:59:26 +01:00
committed by Alexander Udalov
parent 3d2f5f4bc1
commit 7b4e0b2f5d
7 changed files with 82 additions and 19 deletions
@@ -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)()