[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:
Roman Artemev
2018-12-14 15:28:01 +03:00
committed by romanart
parent 04395366fa
commit 256317da15
8 changed files with 46 additions and 24 deletions
-2
View File
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
fun box() : String {
var a = 1
+9
View File
@@ -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"
}