Skip to content

Commit

Permalink
add workaround for nim-lang#2465 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Mar 22, 2021
1 parent 9f54808 commit 1bdc6c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/core/macros.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,8 @@ macro genAst*(args: varargs[untyped]): untyped =
(2, "asdf", "caller scope!", kfoo1, kfoo2, kfoo3, kfoo4)

let params = newTree(nnkFormalParams, newEmptyNode())
let name = genSym(nskTemplate, "fun")
# using `_` as workaround, see https://github.com/nim-lang/Nim/issues/2465#issuecomment-511076669
let name = genSym(nskTemplate, "_fun")
let call = newCall(name)
for a in args[0..^2]:
var varName: NimNode
Expand Down

0 comments on commit 1bdc6c9

Please sign in to comment.