diff options
Diffstat (limited to 'compiler/semcall.nim')
-rw-r--r-- | compiler/semcall.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim index a5049fc32..232a350b8 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -157,7 +157,7 @@ proc presentFailedCandidates(c: PContext, n: PNode, errors: CandidateErrors): for err in errors: var errProto = "" let n = err.sym.typ.n - for i in countup(1, n.len - 1): + for i in 1 ..< n.len: var p = n.sons[i] if p.kind == nkSym: add(errProto, typeToString(p.sym.typ, preferName)) @@ -396,7 +396,7 @@ proc resolveOverloads(c: PContext, n, orig: PNode, elif c.config.errorCounter == 0: # don't cascade errors var args = "(" - for i in countup(1, sonsLen(n) - 1): + for i in 1 ..< sonsLen(n): if i > 1: add(args, ", ") add(args, typeToString(n.sons[i].typ)) add(args, ")") @@ -613,7 +613,7 @@ proc explicitGenericInstantiation(c: PContext, n: PNode, s: PSym): PNode = # XXX I think this could be improved by reusing sigmatch.paramTypesMatch. # It's good enough for now. result = newNodeI(a.kind, getCallLineInfo(n)) - for i in countup(0, len(a)-1): + for i in 0 ..< len(a): var candidate = a.sons[i].sym if candidate.kind in {skProc, skMethod, skConverter, skFunc, skIterator}: |