mutant
mutant copied to clipboard
Add mutation from `expression1 or expression2` to `expression2 unless expression1`
This specific mutation will expose cases where or
is used but the return value of the second expression is not used when the first expression is invalid. It is usually only necessary to use or
when you are relying on it's lower precedence to chain together multiple statements, otherwise an unless
is usually simpler and cleaner.
A similar mutation could apply to and
, where expression1 and expression
could be mutated to expression2 if expression1
.
Looks like I typo'd the issue number in the commits related to this. Just for the sake of keeping github issues and commits linked:
- commit: https://github.com/backus/mutant/commit/2f53ef0d01b0e86ecc0c634344711ad24265aa38
- PR: https://github.com/mbj/mutant/pull/430
- Revert PR: https://github.com/mbj/mutant/pull/437
@backus thx for that.