-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add compile-time symbol for genericsOpenSym
#23385
Comments
Also add a |
metagn
added a commit
to metagn/Nim
that referenced
this issue
May 4, 2024
narimiran
pushed a commit
that referenced
this issue
Aug 14, 2024
refs #23873 (comment), fixes #23386, fixes #23385, supersedes #23572 Turns the `nfOpenSym` node flag implemented in #23091 and extended in containing either `nkSym` or `nkOpenSymChoice`. Since this affects macros working on generic proc AST, the node kind is now only generated when the experimental switch `genericsOpenSym` is enabled, and a new node flag `nfDisabledOpenSym` is set to the `nkSym` or `nkOpenSymChoice` when the switch is not enabled so that we can give a warning. Now that the experimental switch has more reasonable semantics, we define `nimHasGenericsOpenSym2`. (cherry picked from commit 0c890ff)
narimiran
pushed a commit
that referenced
this issue
Aug 14, 2024
refs #23873 (comment), fixes #23386, fixes #23385, supersedes #23572 Turns the `nfOpenSym` node flag implemented in #23091 and extended in containing either `nkSym` or `nkOpenSymChoice`. Since this affects macros working on generic proc AST, the node kind is now only generated when the experimental switch `genericsOpenSym` is enabled, and a new node flag `nfDisabledOpenSym` is set to the `nkSym` or `nkOpenSymChoice` when the switch is not enabled so that we can give a warning. Now that the experimental switch has more reasonable semantics, we define `nimHasGenericsOpenSym2`. (cherry picked from commit 0c890ff)
narimiran
pushed a commit
that referenced
this issue
Aug 14, 2024
refs #23873 (comment), fixes #23386, fixes #23385, supersedes #23572 Turns the `nfOpenSym` node flag implemented in #23091 and extended in containing either `nkSym` or `nkOpenSymChoice`. Since this affects macros working on generic proc AST, the node kind is now only generated when the experimental switch `genericsOpenSym` is enabled, and a new node flag `nfDisabledOpenSym` is set to the `nkSym` or `nkOpenSymChoice` when the switch is not enabled so that we can give a warning. Now that the experimental switch has more reasonable semantics, we define `nimHasGenericsOpenSym2`. (cherry picked from commit 0c890ff)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Add a
nimGenericsOpenSym
injected define whengenericsOpenSym
is enabledDescription
This is needed to write code that reacts to the experimental feature being enabled, in when expressions so that it can use workarounds when the feature is not enabled.
Alternatives
No response
Examples
No response
Backwards Compatibility
No response
Links
No response
The text was updated successfully, but these errors were encountered: