JVM_IR: support @JvmStatic transformations in LateinitLowering

#KT-46759 Fixed
This commit is contained in:
pyos
2021-05-19 10:16:26 +02:00
committed by TeamCityServer
parent f1f13b6e97
commit b2ef854aa1
3 changed files with 35 additions and 23 deletions
@@ -2,11 +2,13 @@
// TARGET_BACKEND: JVM
object Test {
@JvmStatic
fun foo(x: String, y: String = "") = x + y
fun foo(x: String, y: String = "") = x + value
var value = ""
}
fun callFoo(f: (String) -> String, value: String) = f(value)
fun test() = Test
fun test() = Test.apply { value = "K" }
fun box() = callFoo(Test::foo, "O") + callFoo(test()::foo, "K")
fun box() = callFoo(Test::foo, "O") + callFoo(test()::foo, "")