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

8 lines
148 B
Plaintext
Raw Normal View History

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