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 Jul 26, 2019
1 parent 749328d commit aae7e50
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 @@ -1371,7 +1371,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 aae7e50

Please sign in to comment.