fixes #1669
This commit is contained in:
parent
326bdae8ca
commit
2a1acbd1a6
2 changed files with 11 additions and 3 deletions
|
|
@ -170,9 +170,10 @@ proc semRangeAux(c: PContext, n: PNode, prev: PType): PType =
|
|||
range[1] = semExprWithType(c, n[2], {efDetermineType})
|
||||
|
||||
var rangeT: array[2, PType]
|
||||
for i in 0..1: rangeT[i] = range[i].typ.skipTypes({tyStatic}).skipIntLit
|
||||
for i in 0..1:
|
||||
rangeT[i] = range[i].typ.skipTypes({tyStatic}).skipIntLit
|
||||
|
||||
if not sameType(rangeT[0], rangeT[1]):
|
||||
if not sameType(rangeT[0].skipTypes({tyRange}), rangeT[1].skipTypes({tyRange})):
|
||||
localError(n.info, errPureTypeMismatch)
|
||||
elif not rangeT[0].isOrdinalType:
|
||||
localError(n.info, errOrdinalTypeExpected)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue