Files
wren/test/language/closure/close_over_method_parameter.wren
Bob Nystrom eff4485a56 Clean up definition syntax:
- Don't use "def" on constructors.
- Put "foreign" and "static" before "def".
2015-12-18 06:59:49 -08:00

15 lines
178 B
Plaintext

var F = null
class Foo {
construct new() {}
def method(param) {
F = Fn.new {
System.print(param)
}
}
}
Foo.new().method("param")
F.call() // expect: param