File tree 1 file changed +15
-4
lines changed 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,22 @@ To resolve the value of a _variable_,
124
124
its _name_ is used to identify either a local variable,
125
125
or a variable defined elsewhere.
126
126
127
- The _name_ of a variable MUST either be:
128
- * The _name_ of a _variable_ of a _declaration_
127
+ When a _variable_is used as an _operand_,
128
+ the _name_ of this variable MUST either be:
129
+ 1. The _name_ of a _variable_ of a _declaration_ that occurs before the
130
+ _operand_, or:
131
+ 1. An externally defined variable.
129
132
130
- It is an error for the right-hand side of a local variable declaration to
131
- refer to a local variable that's declared after it in the message.
133
+ In case 1, the `entire` _declaration_ MUST appear before the _operand_.
134
+ For example, resolution of the following declaration should fail:
135
+
136
+ ```
137
+ let $var = {$var}
138
+ ```
139
+
140
+ because although a _variable_ with _name_ `var` occurs before
141
+ the expression `{$var}`, the entire declaration `let $var = {$var}`
142
+ does not occur before the expression `{$var}`.
132
143
133
144
Variable names are required to be globally unique. That is,
134
145
for any local variable declaration of the form `let $v = e`:
You can’t perform that action at this time.
0 commit comments