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

In-place operation on immutable struct field #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

guiburon
Copy link

@guiburon guiburon commented Apr 17, 2023

Resolves #16

Relaxed the test on :C to Union{Symbol, Expr}.
Removed the unnecessary leading :($(esc(C)) = in returned expressions that would mutate an immutable struct field.
Duplicated the existing tests with variables wrapped in an immutable struct.

Allowed result C to be an Expr for when it is a struct field
Removed the unnecessary C= in returned Expr because it is incompatible
with struct immutability
@guiburon guiburon changed the title Resolves #16 by supporting in-place struct field operations In-place operation on immutable struct field Apr 17, 2023
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

Successfully merging this pull request may close these issues.

Unnecessary C = in in-place expression is incompatible with immutable struct field
1 participant