From bc2aaea853d3bd1ad7641bf32335e3725f03afed Mon Sep 17 00:00:00 2001 From: transfuturist Date: Sun, 17 May 2015 15:05:26 -0700 Subject: [PATCH] Change check for NimNode items to node kind --- lib/core/macros.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 41998250e5..0bfdffc5dc 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -709,7 +709,7 @@ proc ident*(name: string): NimNode {.compileTime,inline.} = newIdentNode(name) ## Create a new ident node from a string iterator items*(n: NimNode): NimNode {.inline.} = - if n[0] != nil: + if n.kind in {nnkType, nnkMetaNode .. nnkReturnToken}: for i in 0 .. high(n): yield n[i]