We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8190f1a commit 2bd1685Copy full SHA for 2bd1685
1 file changed
src/environment/environment.rs
@@ -200,7 +200,10 @@ impl<A: Clone + Debug> Environment<A> {
200
for (func_signature, func) in &self.globals.functions {
201
all_functions.insert(func_signature.clone(), func.clone());
202
}
203
- for scope in self.stack.iter() {
+ // It is necessary to traverse the scope stack from bottom to top
204
+ // so that functions defined in inner scopes can shadow those
205
+ // defined in outer scopes.
206
+ for scope in self.stack.iter().rev() {
207
for (func_signature, func) in &scope.functions {
208
209
0 commit comments