Merge pull request #2189 from Varriount/param-uint-ranges
Allow ranges with unsigned integer ordinals to be used as parameter types
This commit is contained in:
commit
c3244ef1ff
1 changed files with 1 additions and 1 deletions
|
|
@ -1100,7 +1100,7 @@ proc typeAllowedAux(marker: var IntSet, typ: PType, kind: TSymKind,
|
||||||
result = typeAllowedAux(marker, lastSon(t), kind, flags)
|
result = typeAllowedAux(marker, lastSon(t), kind, flags)
|
||||||
of tyRange:
|
of tyRange:
|
||||||
if skipTypes(t.sons[0], abstractInst-{tyTypeDesc}).kind notin
|
if skipTypes(t.sons[0], abstractInst-{tyTypeDesc}).kind notin
|
||||||
{tyChar, tyEnum, tyInt..tyFloat128}: result = t
|
{tyChar, tyEnum, tyInt..tyFloat128, tyUInt8..tyUInt32}: result = t
|
||||||
of tyOpenArray, tyVarargs:
|
of tyOpenArray, tyVarargs:
|
||||||
if kind != skParam: result = t
|
if kind != skParam: result = t
|
||||||
else: result = typeAllowedAux(marker, t.sons[0], skVar, flags)
|
else: result = typeAllowedAux(marker, t.sons[0], skVar, flags)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue