JVM_IR: do not evaluate receiver of static calls if it is pure
#KT-46802 Fixed
This commit is contained in:
+12
@@ -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")
|
||||
Reference in New Issue
Block a user