From 25c3a62acd006e181e8367dc876c02f77fa8965f Mon Sep 17 00:00:00 2001 From: Hans Raaf Date: Tue, 21 Jun 2016 13:13:46 +0200 Subject: [PATCH] Fix a warning about result reused in macros.nim. --- lib/core/macros.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 16a954611a..85ebdbfd01 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -758,12 +758,12 @@ template findChild*(n: NimNode; cond: expr): NimNode {. ## var res = findChild(n, it.kind == nnkPostfix and ## it.basename.ident == !"foo") block: - var result: NimNode + var res: NimNode for it in n.children: if cond: - result = it + res = it break - result + res proc insert*(a: NimNode; pos: int; b: NimNode) {.compileTime.} = ## Insert node B into A at pos