Replace countup(x, y) with x .. y

This commit is contained in:
Clyybber 2019-05-07 12:37:28 +02:00
commit cc28eef38e
35 changed files with 103 additions and 103 deletions

View file

@ -465,7 +465,7 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
add(result, ']')
of tyGenericBody:
result = typeToString(t.lastSon) & '['
for i in countup(0, sonsLen(t)-2):
for i in 0 .. sonsLen(t)-2:
if i > 0: add(result, ", ")
add(result, typeToString(t.sons[i], preferTypeName))
add(result, ']')
@ -506,7 +506,7 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
of tyUserTypeClassInst:
let body = t.base
result = body.sym.name.s & "["
for i in countup(1, sonsLen(t) - 2):
for i in 1 .. sonsLen(t) - 2:
if i > 1: add(result, ", ")
add(result, typeToString(t.sons[i]))
result.add "]"