-
Notifications
You must be signed in to change notification settings - Fork 3
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
Mutation of expression used in initializer list results in ill-formed program #270
Comments
Note that |
While we can reduce this bug by avoiding mutation of expression in such case, I think this approach will further reduce the number of mutants. Is it possible to change the prelude function to a templated version
and mutate the fault-causing expression to:
|
I am worried that having templated mutator functions may end up getting very complicated and leading to unexpected issues. On the other hand, it might actually turn out to provide a simple and elegant solution to certain issues. @JonathanFoo0523 can you experiment with the template idea? If it turns out to be non-trivial then I would prefer to work around this by detecting the special case and avoiding a mutation in that special case, and opening a "stretch goal" issue to consider a better solution in the longer term. |
A slightly simpler example
|
Another Example:
|
Applying Dredd to
change the sole statement in
main()
toThis causes the following compilation error:
The text was updated successfully, but these errors were encountered: