-
-
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
nim-1.4.0 regression: expandMacros compilation error #15691
Labels
Comments
git bisect returns #15158:
/cc @Clyybber |
I did not investigate this thouroughly, but this may be also the reason why tests of https://github.com/andreaferretti/interfaced fail |
This bug still exists in recent devel Nim. import std/macros
macro simplifiedExpandMacros(body: typed): untyped =
result = body
simplifiedExpandMacros:
proc testProc() = discard
simplifiedExpandMacros:
template testTemplate(): untyped = discard
# Error: illformed AST: macro testMacro(): untyped =
simplifiedExpandMacros:
macro testMacro(): untyped = discard
Nim version: $ nim -v
Nim Compiler Version 1.7.1 [Linux: amd64]
Compiled at 2022-06-30
Copyright (c) 2006-2022 by Andreas Rumpf
git hash: bcff13debcbdd8108237c8033e4dc9c38bb331e0
active boot switches: -d:release |
metagn
added a commit
to metagn/Nim
that referenced
this issue
Apr 7, 2023
`semProcAux` has a check for `checkMinSonsLen(n, bodyPos + 1)`
Merged
capocasa
pushed a commit
to capocasa/Nim
that referenced
this issue
May 15, 2023
`semProcAux` has a check for `checkMinSonsLen(n, bodyPos + 1)`
capocasa
pushed a commit
to capocasa/Nim
that referenced
this issue
May 16, 2023
`semProcAux` has a check for `checkMinSonsLen(n, bodyPos + 1)`
bung87
pushed a commit
to bung87/Nim
that referenced
this issue
Jul 29, 2023
`semProcAux` has a check for `checkMinSonsLen(n, bodyPos + 1)`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code compiles (and runs) perfectly fine under 1.2.6 and 1.2.8 but fails compilation in 1.4.0
MWE code
https://play.nim-lang.org/#ix=2BF4
Produced output (nim-1.4.0)
Compilation fails with the following error message
Expected Output
The MWE code is expected to compile and produce no output when run. The expected behavior is observed under nim 1.2.8 and 1.2.6.
Additional Information
MacOS Mojave (10.14.6)
The text was updated successfully, but these errors were encountered: