JS backend: added more tests for closures.

This commit is contained in:
Zalim Bashorov
2014-02-26 16:04:33 +04:00
parent ec71a90394
commit a48dc25c46
18 changed files with 518 additions and 5 deletions
@@ -0,0 +1,30 @@
package foo
val f = true
fun box(): String {
val bar = "test "
val boo = "another "
fun baz(): String {
var result = bar
if (f) {
val bar = 42
result += bar
val boo = 7
result += boo
}
result += boo
result += bar
return result
}
val r = baz()
if (r != "test 427another test ") return r;
return "OK"
}