Skip to content

Commit

Permalink
Use current code position when making binaryCode in aug. assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed Dec 18, 2024
1 parent ee2e042 commit 3ca17a5
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 @@ -1296,17 +1296,17 @@ augmentedAssignmentFun(x:augmentedAssignmentCode):Expr := (
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));
r := Code(binaryCode(s.binary, Code(left), x.rhs, x.position));
if y.f == DotS.symbol.binary || y.f == SharpS.symbol.binary
then AssignElemFun(y.lhs, y.rhs, r)
else InstallValueFun(CodeSequence(
convertGlobalOperator(x.info), y.lhs, y.rhs, r)))
is y:adjacentCode do (
r := Code(binaryCode(s.binary, Code(left), x.rhs, dummyPosition));
r := Code(binaryCode(s.binary, Code(left), x.rhs, x.position));
InstallValueFun(CodeSequence(
convertGlobalOperator(AdjacentS.symbol), y.lhs, y.rhs, r)))
is y:unaryCode do (
r := Code(binaryCode(s.binary, Code(left), x.rhs, dummyPosition));
r := Code(binaryCode(s.binary, Code(left), x.rhs, x.position));
UnaryInstallValueFun(convertGlobalOperator(x.info), y.rhs, r))
else buildErrorPacket(
"augmented assignment not implemented for this code")));
Expand Down

0 comments on commit 3ca17a5

Please sign in to comment.