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

Perl_ck_refassign: support refassigning into a state variable #21351

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

richardleach
Copy link
Contributor

Prior to this commit, Perl_ck_refassign did not check if the target was a state variable and, if so, wrap it in a ONCE op so that the RHS is only evaluated once.

Closes #19927.

Prior to this commit, Perl_ck_refassign did not check if the
target was a state variable and, if so, wrap it in a ONCE op
so that the RHS is only evaluated once.
@richardleach richardleach merged commit b82b16a into Perl:blead Aug 25, 2023
28 checks passed
@richardleach richardleach deleted the hydahy/19927_state_ref branch August 25, 2023 21:43
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.

state \@array = do {}; runs multiple times.
2 participants