Files
wren/test/language/this/nested_closure.wren
T

8 lines
184 B
Plaintext
Raw Normal View History

2013-12-21 15:55:08 -08:00
class Foo {
2014-04-03 07:48:19 -07:00
getClosure { new Fn { new Fn { new Fn { toString } } } }
toString { "Foo" }
2013-12-21 15:55:08 -08:00
}
var closure = (new Foo).getClosure
2015-02-26 23:08:36 -08:00
IO.print(closure.call().call().call()) // expect: Foo