This commit is contained in:
Andreas Rumpf 2017-02-24 00:32:03 +01:00
commit 2d546ca0ac
5 changed files with 28 additions and 7 deletions

View file

@ -0,0 +1,18 @@
# bug #5417
import macros
macro genBody: untyped =
let sbx = genSym(nskLabel, "test")
when true:
result = quote do:
block `sbx`:
break `sbx`
else:
template foo(s1, s2) =
block s1:
break s2
result = getAst foo(sbx, sbx)
proc test() =
genBody()