IR: Lower shared variables in enum entries (KT-46605)

This commit is contained in:
Steven Schäfer
2021-05-17 12:33:09 +02:00
committed by Alexander Udalov
parent b78c645fb0
commit 60bc0f4baf
10 changed files with 61 additions and 4 deletions
+17
View File
@@ -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()
}