backend/tests: add disabled tests memory_var{1..4}
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
fun main(args : Array<String>) {
|
||||
var x = Any()
|
||||
|
||||
for (i in 0..1) {
|
||||
val c = Any()
|
||||
if (i == 0) x = c
|
||||
}
|
||||
|
||||
// x refcount is 1.
|
||||
|
||||
val y = try {
|
||||
x
|
||||
} finally {
|
||||
x = Any()
|
||||
}
|
||||
|
||||
y.use()
|
||||
}
|
||||
|
||||
fun Any?.use() {
|
||||
var x = this
|
||||
}
|
||||
Reference in New Issue
Block a user