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.
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.