[IR BE] Fix SharedVariableLowering
* make it able to detect shared vars under any declaration kind, not only IrFunction * Add & update tests
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box() : String {
|
||||
var a = 1
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
fun box() : String {
|
||||
var a = 1
|
||||
|
||||
object {
|
||||
val t = run { a++ }
|
||||
}
|
||||
return if (a == 2) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user