Files
wren/test/language/this/closure.wren
2015-11-27 21:17:34 -08:00

9 lines
167 B
Plaintext

class Foo {
construct new() {}
getClosure { fn () { toString } }
toString { "Foo" }
}
var closure = Foo.new().getClosure
System.print(closure()) // expect: Foo