diff --git a/Interpreter.cs b/Interpreter.cs index 45aeee7..e1bad2e 100644 --- a/Interpreter.cs +++ b/Interpreter.cs @@ -508,10 +508,10 @@ public class Interpreter : AST.IExprVisitor throw new RuntimeError(tok, "Record updates must be to unique fields."); } updateLabels.Add(label); - if (update.Value == null) throw new NotImplementedException(); + var updateValue = update.Value == null ? env[update.Name] : evaluate(env, update.Value); try { - baseRec = baseRec.Update(label, evaluate(env, update.Value)); + baseRec = baseRec.Update(label, updateValue); } catch {