Invert assignments¶
Invert assignments will perform inversions on basic arithmetic operations, and it assigns the result of the two left and right operands to the left operand.
Mutation table¶
| Original | Mutated |
|---|---|
| += | -= |
| -= | += |
| *= | /= |
| /= | *= |
| %= | *= |
Examples¶
a := 1
a *= 2
a := 1
a /= 2