From f18b3af9d4a6393ba988cdb17d8f0861b1c75c7d Mon Sep 17 00:00:00 2001 From: Clyybber Date: Tue, 7 May 2019 12:04:00 +0200 Subject: Replace countup(x, y-1) with x ..< y --- compiler/aliases.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/aliases.nim') 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 -- cgit 1.4.1-2-gfad0