diff options
author | Hans Raaf <hara@oderwat.de> | 2016-06-21 13:13:46 +0200 |
---|---|---|
committer | Hans Raaf <hara@oderwat.de> | 2016-06-21 13:13:46 +0200 |
commit | 25c3a62acd006e181e8367dc876c02f77fa8965f (patch) | |
tree | d1e963fe1e68429727a289ccbb3b57868033cdcc | |
parent | 2405f8e347a4cc3be0b1376c0baf795be7c2dd75 (diff) | |
download | Nim-25c3a62acd006e181e8367dc876c02f77fa8965f.tar.gz |
Fix a warning about result reused in macros.nim.
-rw-r--r-- | lib/core/macros.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 16a954611..85ebdbfd0 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 |