Skip to content

Commit

Permalink
Don't bother casting Error back to Expr during augmented assignment
Browse files Browse the repository at this point in the history
We already have the Expr object we need!
  • Loading branch information
d-torrance committed Dec 18, 2024
1 parent d16750e commit ee2e042
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions M2/Macaulay2/d/evaluate.d
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit ee2e042

Please sign in to comment.