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

Make sure const var variables are constant #982

Merged
merged 2 commits into from
Aug 6, 2023

Conversation

larsclausen
Copy link
Collaborator

Commit 3daa298 ("Add support for const variables") added support for
constant variables, but had a small mistake and did propagate the constant
flag from the parser if the variable is declared with the var keyword.
Still allowing to modify those variables. Fix this.

Commit 3daa298 ("Add support for `const` variables") added support for
constant variables, but had a small mistake and did propagate the constant
flag from the parser if the variable is declared with the `var` keyword.
Still allowing to modify those variables. Fix this.

Signed-off-by: Lars-Peter Clausen <[email protected]>
Check that variables declared with `const var` can not be modified.

Signed-off-by: Lars-Peter Clausen <[email protected]>
@larsclausen larsclausen changed the title Make sure const var variables are constant Make sure const var variables are constant Jul 30, 2023
@caryr caryr merged commit 0651e0b into steveicarus:master Aug 6, 2023
5 checks passed
@larsclausen larsclausen deleted the const-var-fix branch August 6, 2023 09:33
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.

2 participants