Files
wren/test/language/module_variable/assignment.wren
Bob Nystrom c3e2f17758 Allow infix () and {} to call "call" on the left-hand side.
- 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.)
2015-12-01 07:49:04 -08:00

19 lines
307 B
Plaintext

var variable = "before"
System.print(variable) // expect: before
variable = "after"
System.print(variable) // expect: after
class Foo {
static method {
variable = "method"
}
}
Foo.method
System.print(variable) // expect: method
Fn.new {
variable = "fn"
}()
System.print(variable) // expect: fn