low/high for float ranges (#11177)

This commit is contained in:
Oscar Nihlgård 2019-05-06 21:19:40 +02:00 • committed by Andreas Rumpf
commit 4c6fc173b7
4 changed files with 27 additions and 7 deletions

View file

@ -316,7 +316,7 @@ proc semLowHigh(c: PContext, n: PNode, m: TMagic): PNode =
n.typ = getSysType(c.graph, n.info, tyInt)
of tyArray:
n.typ = typ.sons[0] # indextype
of tyInt..tyInt64, tyChar, tyBool, tyEnum, tyUInt8, tyUInt16, tyUInt32:
of tyInt..tyInt64, tyChar, tyBool, tyEnum, tyUInt8, tyUInt16, tyUInt32, tyFloat..tyFloat64:
# do not skip the range!
n.typ = n.sons[1].typ.skipTypes(abstractVar)
of tyGenericParam: