Skip to content

Remove self-assignments

Remove self-assignments will perform a trivial assignment, instead of assigning 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