Fix a warning about result reused in macros.nim.
This commit is contained in:
parent
2405f8e347
commit
25c3a62acd
1 changed files with 3 additions and 3 deletions
|
|
@ -758,12 +758,12 @@ template findChild*(n: NimNode; cond: expr): NimNode {.
|
||||||
## var res = findChild(n, it.kind == nnkPostfix and
|
## var res = findChild(n, it.kind == nnkPostfix and
|
||||||
## it.basename.ident == !"foo")
|
## it.basename.ident == !"foo")
|
||||||
block:
|
block:
|
||||||
var result: NimNode
|
var res: NimNode
|
||||||
for it in n.children:
|
for it in n.children:
|
||||||
if cond:
|
if cond:
|
||||||
result = it
|
res = it
|
||||||
break
|
break
|
||||||
result
|
res
|
||||||
|
|
||||||
proc insert*(a: NimNode; pos: int; b: NimNode) {.compileTime.} =
|
proc insert*(a: NimNode; pos: int; b: NimNode) {.compileTime.} =
|
||||||
## Insert node B into A at pos
|
## Insert node B into A at pos
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue