more improvements for idetools
This commit is contained in:
parent
541fdceb57
commit
976c39cdc9
4 changed files with 17 additions and 9 deletions
|
|
@ -1256,10 +1256,10 @@ proc semSetConstr(c: PContext, n: PNode): PNode =
|
|||
n.sons[i] = semExprWithType(c, n.sons[i])
|
||||
if typ == nil:
|
||||
typ = skipTypes(n.sons[i].typ, {tyGenericInst, tyVar, tyOrdinal})
|
||||
if not isOrdinalType(typ):
|
||||
if not isOrdinalType(typ):
|
||||
LocalError(n.info, errOrdinalTypeExpected)
|
||||
return
|
||||
if lengthOrd(typ) > MaxSetElements:
|
||||
typ = makeRangeType(c, 0, MaxSetElements - 1, n.info)
|
||||
elif lengthOrd(typ) > MaxSetElements:
|
||||
typ = makeRangeType(c, 0, MaxSetElements - 1, n.info)
|
||||
addSonSkipIntLit(result.typ, typ)
|
||||
for i in countup(0, sonsLen(n) - 1):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue