'nim check' stability improvements

This commit is contained in:
Araq 2019-07-14 16:11:42 +02:00
commit 58e0dad371
4 changed files with 17 additions and 8 deletions

View file

@ -65,12 +65,12 @@ proc toBitSet*(conf: ConfigRef; s: PNode, b: var TBitSet) =
bitSetInit(b, int(getSize(conf, s.typ)))
for i in 0 ..< sonsLen(s):
if s.sons[i].kind == nkRange:
j = getOrdValue(s.sons[i].sons[0])
while j <= getOrdValue(s.sons[i].sons[1]):
j = getOrdValue(s.sons[i].sons[0], first)
while j <= getOrdValue(s.sons[i].sons[1], first):
bitSetIncl(b, j - first)
inc(j)
else:
bitSetIncl(b, getOrdValue(s.sons[i]) - first)
bitSetIncl(b, getOrdValue(s.sons[i], first) - first)
proc toTreeSet*(conf: ConfigRef; s: TBitSet, settype: PType, info: TLineInfo): PNode =
var