Fix nested closures and related bugs

This commit is contained in:
Nathan Braswell
2015-07-05 02:34:45 -04:00
parent d44ce47d1e
commit cfadf7cebb
13 changed files with 101 additions and 56 deletions

View File

@@ -35,8 +35,21 @@ fun main():int {
var it: ToClose
it.testMethod()
it.testVariable()
//var a = 7
//mem::safe_recursive_delete(&a, fun(it: int*): set::set<int*> { return set::set(it); } )
var a = 129
var b = 222
fun() {
fun() {
println(a)
}()
}()
var c = fun() {
println(b)
fun() {
println(a)
}()
}
c()
return 0
}