'addSon' for types deprecated for 'int literal type' analysis

This commit is contained in:
Araq 2012-07-09 08:09:00 +02:00
commit 121d4e0fc2
13 changed files with 49 additions and 33 deletions

View file

@ -115,7 +115,7 @@ proc makeRange(typ: PType, first, last: biggestInt): PType =
addSon(n, newIntNode(nkIntLit, max(first, last)))
result = newType(tyRange, typ.owner)
result.n = n
addSon(result, skipTypes(typ, {tyRange}))
addSonSkipIntLit(result, skipTypes(typ, {tyRange}))
proc makeRangeF(typ: PType, first, last: biggestFloat): PType =
var n = newNode(nkRange)
@ -123,7 +123,7 @@ proc makeRangeF(typ: PType, first, last: biggestFloat): PType =
addSon(n, newFloatNode(nkFloatLit, max(first.float, last.float)))
result = newType(tyRange, typ.owner)
result.n = n
addSon(result, skipTypes(typ, {tyRange}))
addSonSkipIntLit(result, skipTypes(typ, {tyRange}))
proc getIntervalType*(m: TMagic, n: PNode): PType =
# Nimrod requires interval arithmetic for ``range`` types. Lots of tedious