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

Program calls without parentheses #1180

Open
mhasel opened this issue Mar 27, 2024 · 0 comments
Open

Program calls without parentheses #1180

mhasel opened this issue Mar 27, 2024 · 0 comments
Labels
codesys enhancement New feature or request

Comments

@mhasel
Copy link
Member

mhasel commented Mar 27, 2024

In the past we've often discussed action calls without parentheses and what to do about it going forward. I've now stumbled on a similar use of programs without parentheses while migrating an old project. But contrary to action calls, these statements will not trigger an error during validation/codegen and be generated simply as a load of the program instance. Therefore it is easy to miss these statements and the runtime behaviour of your project will change drastically.
Unfortunately it isn't as easy as just extending the validation-method that worked for actions (#1170), because programs have stateful member-variables which can also be accessed like a struct. So a statement like x := myProg.myVar would trigger false-positives.

@mhasel mhasel added enhancement New feature or request codesys labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codesys enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant