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

9 lines
173 B
Plaintext
Raw Normal View History

2013-12-21 15:55:08 -08:00
class Foo {
2015-09-01 08:16:04 -07:00
construct new() {}
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-09-15 07:46:09 -07:00
System.print(closure.call()) // expect: Foo