-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
push block label sym owner for const
and static
#24085
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
Conversation
As expected the compiler doesn't like that the For I'll test using |
9e280d1
to
d8125e0
Compare
Another option might be to track the introduced variables in vmgen and only allow them to be used Edit: Done in #24674 |
fixes nim-lang#8758, fixes nim-lang#10828, fixes nim-lang#12172, fixes nim-lang#21610, fixes nim-lang#23803, succeeds nim-lang#24085
fixes #8758, fixes #10828, fixes #12172, fixes #21610, fixes #23803, fixes #24633, fixes #24634, succeeds #24085 We simply track the symbol ID of every traversed `var`/`let` definition in `vmgen`, then these symbols are always considered evaluable in the current `vmgen` context. The set of symbols is reset before every generation, but both tests worked properly without doing this including the nested `const`, so maybe it's already done in some way I'm not seeing.
fixes #8758, fixes #10828, fixes #12172, fixes #21610, fixes #23803, fixes #24633, fixes #24634, succeeds #24085 We simply track the symbol ID of every traversed `var`/`let` definition in `vmgen`, then these symbols are always considered evaluable in the current `vmgen` context. The set of symbols is reset before every generation, but both tests worked properly without doing this including the nested `const`, so maybe it's already done in some way I'm not seeing. (cherry picked from commit a5cc33c)
fixes #8758, fixes #10828, fixes #12172, fixes #21610, fixes #23803, fixes #24633, fixes #24634, succeeds #24085 We simply track the symbol ID of every traversed `var`/`let` definition in `vmgen`, then these symbols are always considered evaluable in the current `vmgen` context. The set of symbols is reset before every generation, but both tests worked properly without doing this including the nested `const`, so maybe it's already done in some way I'm not seeing. (cherry picked from commit a5cc33c)
fixes #8758, fixes #10828, fixes #12172, fixes #21610, fixes #23803, refs nim-lang/RFCs#276
Based off of #24084 for now but maybe doesn't need it
Another option is to reuse the
instantiatedFrom
field