-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
import macros
macro foobar(arg: untyped): untyped =
let procDef = quote do:
proc foo(): void =
echo "bar"
result = newStmtList(
arg, procDef
)
echo result.repr
iterator bar(): int {.foobar.} =
discardcompilation log:
nim c -r bug2.nim
Hint: used config file '/local/doering/Nim/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: bug2 [Processing]
Hint: macros [Processing]
iterator bar(): int =
discard
proc foo(): void =
echo "bar"
nim.nim(121) nim
nim.nim(77) handleCmdLine
main.nim(172) mainCommand
main.nim(77) commandCompileToC
modules.nim(240) compileProject
modules.nim(180) compileModule
passes.nim(218) processModule
passes.nim(136) processTopLevelStmt
sem.nim(571) myProcess
sem.nim(539) semStmtAndGenerateGenerics
semstmts.nim(1896) semStmt
semexprs.nim(793) semExprNoType
semexprs.nim(2371) semExpr
semstmts.nim(1635) semIterator
system.nim(2833) sysFatal
Error: unhandled exception: sym is not accessible [FieldError]
nim-compile exited abnormally with code 1 at Tue Jan 16 18:23:19