FIR2IR: load property setter noinline/crossinline flags

#KT-56234 Fixed
This commit is contained in:
pyos
2023-02-06 10:34:15 +01:00
committed by Space Team
parent 8ff4af034a
commit 7420008af9
12 changed files with 158 additions and 3 deletions
@@ -0,0 +1,27 @@
// TARGET_BACKEND: JVM_IR
// FILE: 1.kt
package test
class C {
var x: () -> Unit
inline get() = {}
inline set(crossinline value) {
bar { value() }
}
fun bar(i: I) = i.foo()
}
fun interface I {
fun foo()
}
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
val c = C()
c.x = { result = "OK" }
return result
}
@@ -0,0 +1,28 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_MULTI_MODULE: JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: 1.kt
package test
class C {
var x: () -> Unit
inline get() = {}
inline set(noinline value) {
bar(value)
}
fun bar(i: I) = i.foo()
}
fun interface I {
fun foo()
}
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
val c = C()
c.x = { result = "OK" }
return result
}