diff options
author | Clyybber <darkmine956@gmail.com> | 2019-05-07 12:04:00 +0200 |
---|---|---|
committer | Clyybber <darkmine956@gmail.com> | 2019-05-07 12:32:05 +0200 |
commit | f18b3af9d4a6393ba988cdb17d8f0861b1c75c7d (patch) | |
tree | 8d4fe109101792fb0f7bdfb33c0a0071d34e6f71 /compiler/aliases.nim | |
parent | 9ffab44c35cb31c1811800e130e4dc1bd59503f9 (diff) | |
download | Nim-f18b3af9d4a6393ba988cdb17d8f0861b1c75c7d.tar.gz |
Replace countup(x, y-1) with x ..< y
Diffstat (limited to 'compiler/aliases.nim')
-rw-r--r-- | compiler/aliases.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/aliases.nim b/compiler/aliases.nim index f79210dd7..ef56c5d6c 100644 --- a/compiler/aliases.nim +++ b/compiler/aliases.nim @@ -22,14 +22,14 @@ proc isPartOfAux(n: PNode, b: PType, marker: var IntSet): TAnalysisResult = result = arNo case n.kind of nkRecList: - for i in countup(0, sonsLen(n) - 1): + for i in 0 ..< sonsLen(n): result = isPartOfAux(n.sons[i], b, marker) if result == arYes: return of nkRecCase: assert(n.sons[0].kind == nkSym) result = isPartOfAux(n.sons[0], b, marker) if result == arYes: return - for i in countup(1, sonsLen(n) - 1): + for i in 1 ..< sonsLen(n): case n.sons[i].kind of nkOfBranch, nkElse: result = isPartOfAux(lastSon(n.sons[i]), b, marker) @@ -52,7 +52,7 @@ proc isPartOfAux(a, b: PType, marker: var IntSet): TAnalysisResult = of tyGenericInst, tyDistinct, tyAlias, tySink: result = isPartOfAux(lastSon(a), b, marker) of tyArray, tySet, tyTuple: - for i in countup(0, sonsLen(a) - 1): + for i in 0 ..< sonsLen(a): result = isPartOfAux(a.sons[i], b, marker) if result == arYes: return else: discard |