-
-
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
Variable declaration pragma does not work with const
#14781
Labels
Comments
refs nim-lang/RFCs#220 |
metagn
added a commit
to metagn/Nim
that referenced
this issue
Jan 17, 2022
fix nim-lang#15920, close nim-lang#18212, close nim-lang#14781, close nim-lang#6696, close nim-lang/RFCs#220 Variable macro pragmas have been changed to only take a unary section node. They can now also be applied in sections with multiple variables, as well as `const` sections. They also accept arguments. Templates now support macro pragmas, mirroring other routine types. Type and variable macro pragmas have been made experimental. Symbols without parentheses instatiating nullary macros or templates has also been documented in the experimental manual. A check for a redefinition error based on the left hand side of variable definitions when using variable macro pragmas was disabled. This nerfs `byaddr` specifically, however this has been documented as a consequence of the experimental features `byaddr` uses. Given how simple these changes are I'm worried if I'm missing something.
Araq
pushed a commit
that referenced
this issue
Jan 20, 2022
* New/better macro pragmas, make some experimental fix #15920, close #18212, close #14781, close #6696, close nim-lang/RFCs#220 Variable macro pragmas have been changed to only take a unary section node. They can now also be applied in sections with multiple variables, as well as `const` sections. They also accept arguments. Templates now support macro pragmas, mirroring other routine types. Type and variable macro pragmas have been made experimental. Symbols without parentheses instatiating nullary macros or templates has also been documented in the experimental manual. A check for a redefinition error based on the left hand side of variable definitions when using variable macro pragmas was disabled. This nerfs `byaddr` specifically, however this has been documented as a consequence of the experimental features `byaddr` uses. Given how simple these changes are I'm worried if I'm missing something. * accomodate compiler boot * allow weird pragmas * add test for #10994 * remove some control flow, try remove some logic
PMunch
pushed a commit
to PMunch/Nim
that referenced
this issue
Mar 28, 2022
* New/better macro pragmas, make some experimental fix nim-lang#15920, close nim-lang#18212, close nim-lang#14781, close nim-lang#6696, close nim-lang/RFCs#220 Variable macro pragmas have been changed to only take a unary section node. They can now also be applied in sections with multiple variables, as well as `const` sections. They also accept arguments. Templates now support macro pragmas, mirroring other routine types. Type and variable macro pragmas have been made experimental. Symbols without parentheses instatiating nullary macros or templates has also been documented in the experimental manual. A check for a redefinition error based on the left hand side of variable definitions when using variable macro pragmas was disabled. This nerfs `byaddr` specifically, however this has been documented as a consequence of the experimental features `byaddr` uses. Given how simple these changes are I'm worried if I'm missing something. * accomodate compiler boot * allow weird pragmas * add test for nim-lang#10994 * remove some control flow, try remove some logic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is possible to use variable declaration pragma with
var
andlet
but when usingconst
it fails to compile withError: cannot attach a custom pragma to ...
Example
Current Output
Compilation error on last line in example:
Expected Output
No compilation error
Compiler version
The text was updated successfully, but these errors were encountered: