Skip to content

Commit

Permalink
fixes #11415 by checking all children of recList
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed Jun 5, 2019
1 parent 56f79ab commit 28bb565
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/core/macros.nim
Expand Up @@ -1491,12 +1491,12 @@ proc customPragmaNode(n: NimNode): NimNode =
let varNode = identDefs[i]
# if it is and empty branch, skip
if varNode[0].kind == nnkNilLit: continue
if varNode[1].kind == nnkIdentDefs:
identDefsStack.add(varNode[1])
else: # nnkRecList
for j in 0 ..< varNode[1].len:
identDefsStack.add(varNode[1][j])

for j in 1 ..< varNode.len:
if varNode[j].kind == nnkIdentDefs:
identDefsStack.add(varNode[j])
else: # nnkRecList
for m in 0 ..< varNode[j].len:
identDefsStack.add(varNode[j][m])
else:
for i in 0 .. identDefs.len - 3:
let varNode = identDefs[i]
Expand Down

0 comments on commit 28bb565

Please sign in to comment.