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

Constants - constants validation - constants are read only #293

Closed
Tracked by #208
riederm opened this issue Sep 21, 2021 · 0 comments · Fixed by #304
Closed
Tracked by #208

Constants - constants validation - constants are read only #293

riederm opened this issue Sep 21, 2021 · 0 comments · Fixed by #304
Assignees
Labels
validation candidate for syntactic or semantic validation
Milestone

Comments

@riederm
Copy link
Collaborator

riederm commented Sep 21, 2021

Attempting to write into a constant should result in a validation error.

VAR_GLOBAL CONSTANT
   x : INT := 3;
   strct : MyStruct;
END_VAR

x := 7;  // should fail
strct.member := 7; // should fail
@riederm riederm mentioned this issue Sep 21, 2021
9 tasks
riederm added a commit that referenced this issue Sep 24, 2021
assign statements with CONSTANTS on the left side end
in a validation-error.

tests constant references, qualified references and enum-literals

closes #293
riederm added a commit that referenced this issue Sep 24, 2021
assign statements with CONSTANTS on the left side end
in a validation-error.

tests constant references, qualified references and enum-literals

closes #293
@riederm riederm self-assigned this Sep 25, 2021
@riederm riederm added this to the oscat milestone Sep 25, 2021
@riederm riederm linked a pull request Sep 25, 2021 that will close this issue
riederm added a commit that referenced this issue Sep 26, 2021
validation for readonly constants

assign statements with CONSTANTS on the left side end
in a validation-error.

tests constant references, qualified references and enum-literals

closes #293
@ghaith ghaith moved this to Done in Next Jan 9, 2023
@ghaith ghaith added this to Next Jan 9, 2023
@riederm riederm added the validation candidate for syntactic or semantic validation label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation candidate for syntactic or semantic validation
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant