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

15 lines
174 B
Plaintext
Raw Normal View History

var F = null
2013-12-04 07:43:50 -08:00
class Foo {
2015-09-01 08:16:04 -07:00
construct new() {}
2013-12-04 07:43:50 -08:00
method(param) {
2015-07-10 09:18:22 -07:00
F = Fn.new {
2015-09-15 07:46:09 -07:00
System.print(param)
2013-12-04 07:43:50 -08:00
}
}
}
2015-07-10 09:18:22 -07:00
Foo.new().method("param")
2015-02-26 23:08:36 -08:00
F.call() // expect: param