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

Mutator to remove operand in binary expressions #2950

Open
Liam-Rougoor opened this issue Jun 7, 2024 · 1 comment
Open

Mutator to remove operand in binary expressions #2950

Liam-Rougoor opened this issue Jun 7, 2024 · 1 comment
Assignees
Labels
🚀 Feature request New feature or request

Comments

@Liam-Rougoor
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, we have a BinaryExpressionMutator that swaps operators, for example a + b -> a - b or a && b -> a || b.
For NullCoalescingExpressions, we do not only swap, but also remove either side of the expression.

I think this is something we could also do for other binary expressions.

Describe the solution you'd like
I'd like a mutator that removes either operand in a binary expression. For example, a + b -> a, a + b -> b, a && b -> a, etc.

@Liam-Rougoor Liam-Rougoor added the 🚀 Feature request New feature or request label Jun 7, 2024
@Liam-Rougoor Liam-Rougoor self-assigned this Jun 7, 2024
@dupdob
Copy link
Member

dupdob commented Jul 21, 2024

I am not sure these mutations would behave differently than the regular binary expression one:
if a+b => a-b is killed, a+b => a is probably killed as well. Expect for string operations, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants