Add tests for newly discovered issue with ECMA5 and top level vars in root scope.

This commit is contained in:
Pavel V. Talanov
2012-07-31 18:38:26 +04:00
parent 942c1ee9d9
commit 0710efdc16
3 changed files with 36 additions and 0 deletions
@@ -0,0 +1,14 @@
package foo
var c = 2
fun incC(i: Int) {
c += c + i
}
fun box() : Any? {
for (i in 0..2) {
incC(i)
}
return if (c == 20) "OK" else c
}
@@ -0,0 +1,12 @@
var c = 2
fun incC(i: Int) {
c += c + i
}
fun box() : Any? {
for (i in 0..2) {
incC(i)
}
return if (c == 20) "OK" else c
}