From 58480e57f984d3705c8e99de9a94d855caa2bec9 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Fri, 12 Jul 2019 18:49:20 -0700 Subject: [PATCH] add workaround for https://github.com/nim-lang/Nim/issues/2465#issuecomment-511076669 --- lib/core/macros.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index d509fc998e420..ab11729b2ff9c 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -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