summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/transf.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim
index 80794b581..3250f2ec4 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -434,12 +434,12 @@ proc transformYield(c: PTransf, n: PNode): PNode =
   else:
     # we need to introduce new local variables:
     result.add(introduceNewLocalVars(c, c.transCon.forLoopBody))
-  if result.len > 0:
-    for idx in 0 ..< result.len:
-      var changeNode = result[idx]
-      changeNode.info = c.transCon.forStmt.info
-      for i, child in changeNode:
-        child.info = changeNode.info
+
+  for idx in 0 ..< result.len:
+    var changeNode = result[idx]
+    changeNode.info = c.transCon.forStmt.info
+    for i, child in changeNode:
+      child.info = changeNode.info
 
 proc transformAddrDeref(c: PTransf, n: PNode, a, b: TNodeKind): PNode =
   result = transformSons(c, n)