JVM_IR: do not evaluate receiver of static calls if it is pure

#KT-46802 Fixed
This commit is contained in:
pyos
2021-05-19 09:45:11 +02:00
committed by TeamCityServer
parent ae1590d3cf
commit f1f13b6e97
7 changed files with 91 additions and 6 deletions
@@ -0,0 +1,12 @@
// WITH_RUNTIME
// TARGET_BACKEND: JVM
object Test {
@JvmStatic
fun foo(x: String, y: String = "") = x + y
}
fun callFoo(f: (String) -> String, value: String) = f(value)
fun test() = Test
fun box() = callFoo(Test::foo, "O") + callFoo(test()::foo, "K")