fixes #2979
This commit is contained in:
parent
2a1620490c
commit
ce9fa80b92
1 changed files with 2 additions and 1 deletions
|
|
@ -1582,7 +1582,8 @@ proc genRangeChck(p: BProc, n: PNode, d: var TLoc, magic: string) =
|
|||
var a: TLoc
|
||||
var dest = skipTypes(n.typ, abstractVar)
|
||||
# range checks for unsigned turned out to be buggy and annoying:
|
||||
if optRangeCheck notin p.options or dest.kind in {tyUInt..tyUInt64}:
|
||||
if optRangeCheck notin p.options or dest.skipTypes({tyRange}).kind in
|
||||
{tyUInt..tyUInt64}:
|
||||
initLocExpr(p, n.sons[0], a)
|
||||
putIntoDest(p, d, n.typ, "(($1) ($2))" %
|
||||
[getTypeDesc(p.module, dest), rdCharLoc(a)])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue