mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-16 20:28:04 +01:00
- Allow this for both argument lists and block arguments.
- Tweak precedence to make "." higher than infix "{}" to avoid a
class body being parsed as the superclass clause's block argument.
- Convert all uses of ".call" to use this. (There was not a single
case in the repo that ran into the getter ambiguity.)
22 lines
256 B
Plaintext
22 lines
256 B
Plaintext
var f = null
|
|
|
|
Fn.new {
|
|
var a = "a"
|
|
Fn.new {
|
|
var b = "b"
|
|
Fn.new {
|
|
var c = "c"
|
|
f = Fn.new {
|
|
System.print(a)
|
|
System.print(b)
|
|
System.print(c)
|
|
}
|
|
}()
|
|
}()
|
|
}()
|
|
|
|
f()
|
|
// expect: a
|
|
// expect: b
|
|
// expect: c
|