summary refs log tree commit diff stats
path: root/compiler/semcall.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-05-08 17:18:46 +0200
committerGitHub <noreply@github.com>2019-05-08 17:18:46 +0200
commit61380d0a070a4a691e820e18b25e9dd8fb420306 (patch)
treea786b6ba0f9e831fecfb75de2a5c3d097a24a962 /compiler/semcall.nim
parent8180d443b9938f135dd280bcd5e1727766cd7468 (diff)
parentcc28eef38e601171644ffe1a2775744eaaca8123 (diff)
downloadNim-61380d0a070a4a691e820e18b25e9dd8fb420306.tar.gz
Small cleanup (#11185)
* Remove mStaticTy and mTypeTy

* Replace countup(x, y-1) with x ..< y

* Replace countup(x, y) with x .. y
Diffstat (limited to 'compiler/semcall.nim')
-rw-r--r--compiler/semcall.nim6
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}: