Skip to content

Commit

Permalink
Invalidate replaced variable if present
Browse files Browse the repository at this point in the history
If this variable object has been cached, it must be invalidated
so such code goes back to the table for the new variable.
  • Loading branch information
headius committed Nov 3, 2023
1 parent e4f6aea commit dc6a5ad
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public void alias(String name, String oldName) {
throw RaiseException.from(runtime, runtime.getRuntimeError(), "can't alias in tracer");
}

if (variable != null) variable.invalidate();

globalVariables.put(name, oldVariable);
}

Expand Down

0 comments on commit dc6a5ad

Please sign in to comment.