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,15 @@
package foo
fun box(): String {
fun Int.foo(): Boolean {
fun Int.bar() = this == 2 && this@foo == 1
val b = { this == 1 }
return this == 1 && 2.bar() && b()
}
if (!1.foo()) return "Failed"
return "OK"
}