From ee2e0427ca70b73c453da3503c9c59ee98331dec Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Tue, 17 Dec 2024 14:28:40 -0500 Subject: [PATCH] Don't bother casting Error back to Expr during augmented assignment We already have the Expr object we need! --- M2/Macaulay2/d/evaluate.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/M2/Macaulay2/d/evaluate.d b/M2/Macaulay2/d/evaluate.d index 85af9f2581..b267e6d1b0 100644 --- a/M2/Macaulay2/d/evaluate.d +++ b/M2/Macaulay2/d/evaluate.d @@ -1285,15 +1285,15 @@ augmentedAssignmentFun(x:augmentedAssignmentCode):Expr := ( when x.lhs is y:globalMemoryReferenceCode do ( r := s.binary(Code(left), x.rhs); - when r is e:Error do Expr(e) + when r is e:Error do r else globalAssignment(y.frameindex, x.info, r)) is y:localMemoryReferenceCode do ( r := s.binary(Code(left), x.rhs); - when r is e:Error do Expr(e) + when r is e:Error do r else localAssignment(y.nestingDepth, y.frameindex, r)) is y:threadMemoryReferenceCode do ( r := s.binary(Code(left), x.rhs); - when r is e:Error do Expr(e) + when r is e:Error do r else globalAssignment(y.frameindex, x.info, r)) is y:binaryCode do ( r := Code(binaryCode(s.binary, Code(left), x.rhs, dummyPosition));