summary refs log tree commit diff stats
path: root/compiler/sempass2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/sempass2.nim')
-rw-r--r--compiler/sempass2.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index e5b12e228..7fd2bd5b6 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -832,7 +832,7 @@ proc track(tracked: PEffects, n: PNode) =
           createTypeBoundOps(tracked.c, it.typ, it.info)
     let iterCall = n[n.len-2]
     let loopBody = n[n.len-1]
-    if tracked.owner.kind != skMacro and iterCall.len > 1:
+    if tracked.owner.kind != skMacro and iterCall.safelen > 1:
       # XXX this is a bit hacky:
       if iterCall[1].typ != nil and iterCall[1].typ.skipTypes(abstractVar).kind notin {tyVarargs, tyOpenArray}:
         createTypeBoundOps(tracked.c, iterCall[1].typ, iterCall[1].info)