-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Change VAR syntax so that using it without value promotes variable to specified scope #5369
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
Comments
Link to playground of example: VAR examples |
Like the idea, same issue reported by me some time ago :) |
As the quote in the description explains, I agree that the current behavior is a design mistake and should be changed. Due to backwards compatibility reasons we need to deprecate it first, though, but if we do that in RF 7.3, it ought to be fine to change the syntax in RF 8.0. I think I had noticed #5105 submitted by @MarcinGmurczyk at some point but forgot about it. We now need to decide which one to keep open which to close as a duplicate. I typically close the latter one in this kind of cases, but this issues seems to have a bit more information, including a playground link, so I think I'll close the earlier one. It shouldn't really matter anyway. |
Things to decide:
Once we agree how we want this syntax to work in all cases, I'll submit a separate issue about deprecating the old syntax in RF 7.3 (or RF 7.4 if we cannot agree on this soon). This issue now tracks the eventual syntax change in RF 8. |
Uh oh!
There was an error while loading. Please reload this page.
With regards to VAR syntax and Set Variable there are a few behaviors that do not functionally match.
My observation is that the VAR syntax cannot change an existing variable's scope.
This is a known RF pattern:
In order to so the same thing:
Here is some example code:
A thought:
What if there was a syntax for setting scope of a variable?
The text was updated successfully, but these errors were encountered: