pitest
pitest copied to clipboard
MemberVariableMutator removes assignments to final members
Should the MemberVariableMutator remove assignments to final members? This code would never compile actually, so noone could actually introduce this error. Replacing the assignment by a different assignment would make sense, but this is already handled by other mutators I think.
Especially removing the assignment of null
in certain constructor parts to a final variable is not killable.
While it would not compile, the bytecode is valid but the variable is still null
, so from the tests perspective, at least removing a null
assignment to a final variable makes no sense at all.