Add index to Share statement.

This commit is contained in:
Stephen Chung
2022-10-25 10:05:31 +08:00
parent 6880d44900
commit 6702fe349c
5 changed files with 25 additions and 14 deletions

View File

@@ -188,7 +188,7 @@ impl Engine {
// Find the variable in the scope
let var_name = expr.get_variable_name(true).expect("`Expr::Variable`");
match scope.get_index(var_name) {
match scope.search(var_name) {
Some(index) => index,
None => {
return match self.global_modules.iter().find_map(|m| m.get_var(var_name)) {