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 8, 2023
1 parent 2042d66 commit 2a82b6d
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 2a82b6d

Please sign in to comment.