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

How to avoid mutation did not compile when the variable is a struct type? #96

Open
xjtuhorse opened this issue Dec 16, 2021 · 0 comments

Comments

@xjtuhorse
Copy link

Mutation did not compile
@@ -1122,7 +1122,7 @@
-- enqueue(&e.heapLoc)
++ _, _ = enqueue, e.heapLoc{}
Exited with 2

Mutation did not compile
@@ -620,8 +620,7 @@
-- #e.stmts(n.Ninit)
++ _, _ = e.stmts, n.Ninit{}
Exited with 2

In the preceding example, heapLoc and Ninit are variables of the struct type. If the variables are used as structs, the compilation fails after mutation. The type of this variable should be correctly identified so that it can be compiled and executed. In the above mutated code, {} is unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant