IR: Lower shared variables in enum entries (KT-46605)
This commit is contained in:
committed by
Alexander Udalov
parent
b78c645fb0
commit
60bc0f4baf
+17
@@ -0,0 +1,17 @@
|
||||
fun call(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
enum class E(val f: () -> String) {
|
||||
A({
|
||||
var value = "Fail"
|
||||
call {
|
||||
value = "OK"
|
||||
}
|
||||
value
|
||||
})
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return E.A.f()
|
||||
}
|
||||
Reference in New Issue
Block a user