Interpreter - Refactored instance to avoid runtime borrom problems

This commit is contained in:
Emmanuel BENOîT 2023-01-11 08:21:48 +01:00
parent c4f0f0f721
commit 47c4136c25
3 changed files with 6 additions and 23 deletions
src/interpreter

View file

@ -553,7 +553,7 @@ impl ExprNode {
set_expr: &SetExpr,
) -> InterpreterResult {
let instance = set_expr.instance.interpret(itpr_state)?.result();
instance.with_instance_mut(
instance.with_instance(
|instance| {
let value = set_expr.value.interpret(itpr_state)?.result();
instance.set(&set_expr.name, value.clone());