[IR] Fix saving function calls during inlining const properties in PropertyAccessorInlineLowering (#3971)

This commit is contained in:
LepilkinaElena
2020-12-10 12:24:23 +03:00
committed by GitHub
parent dccfb33bcc
commit c8c83c04c0
18 changed files with 121 additions and 44 deletions
@@ -0,0 +1,22 @@
// IGNORE_BACKEND: JVM_IR, JS, JS_IR_ES6
// IGNORE_BACKEND_FIR: JVM_IR
var a = 12
object C {
const val x = 42
}
fun getC(): C {
a = 123
return C
}
fun box(): String {
val field = getC().x
val expectedResult = 123
if (a == expectedResult)
return "OK"
else
return "FAIL"
}