1
0
forked from Mirror/wren
Files
wren/test/this/nested_closure.wren
Bob Nystrom b979272305 Clean up text handling a bit:
- Rename IO.write -> IO.print.
- Make IO.write not print a newline.
- Support \u Unicode escapes in strings.
2014-01-05 12:27:12 -08:00

17 lines
255 B
Plaintext

class Foo {
getClosure {
return fn {
return fn {
return fn {
return this.toString
}
}
}
}
toString { return "Foo" }
}
var closure = (new Foo).getClosure
IO.print(closure.call.call.call) // expect: Foo