Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New mutation: swap true and false #140

Open
ZevEisenberg opened this issue Aug 7, 2019 · 1 comment
Open

New mutation: swap true and false #140

ZevEisenberg opened this issue Aug 7, 2019 · 1 comment
Assignees
Labels
mutation operators Work that's intended to improve the mutation operators muter has

Comments

@ZevEisenberg
Copy link
Collaborator

Code like this:

foo = true // before
foo = false // after

Here’s a case where this could be better than just deleting lines with only side effects: you set the value to true, and true is the default, so removing the line does nothing, but negating the line does.

It is also useful for initializers and method parameters:

let x = foo(bar: true) // before
let x = foo(bar: false) // after
@SeanROlszewski SeanROlszewski added the mutation operators Work that's intended to improve the mutation operators muter has label Aug 11, 2019
@SeanROlszewski
Copy link
Contributor

Thanks for this @ZevEisenberg! We'll prioritize this once we start adding new mutation operators

@rakaramos rakaramos added this to To do in Work in progress via automation Oct 21, 2023
@rakaramos rakaramos moved this from To do to Prioritized For Next Release in Work in progress Oct 21, 2023
@rakaramos rakaramos self-assigned this Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mutation operators Work that's intended to improve the mutation operators muter has
Projects
Work in progress
  
Prioritized For Next Release
Development

No branches or pull requests

3 participants