-
Notifications
You must be signed in to change notification settings - Fork 139
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
Wrong implicit symbol declaration in "autodeclare index" #324
Comments
Thank you for your report!
The reason why you may get Lines 1029 to 1037 in 0b3ab5d
|
The problem is caused by a rather error-prone way that auto-declared statements are processed. The entry point is:
So the What happens in a situation like:
is that when To fix it, in
and set it back to the original value at the end. This fixes this problem, and hopefully doesn't have side-effects. Basically any place where auto-declared variables is used for the first time in another auto-declared statement, this problem occurs. I believe |
The following, short program does not behave as expected:
`*symbol n;
autodeclare index randomIndex=n;
local A = n;
print +s;
.end`
Without declaring "n" the expected behavior would be to declare it implicitly as a symbol with a warning (as it is the case for the program without the "autodeclare" statement).
Funnily, the program runs without complains and returns
i_
.The text was updated successfully, but these errors were encountered: