remove hack for deprecated csize in compiler (#20463)
* remove hack for deprecated csize in compiler * remove test
This commit is contained in:
parent
96c5586d03
commit
24b81e9df6
2 changed files with 2 additions and 7 deletions
|
|
@ -2252,8 +2252,7 @@ proc genRangeChck(p: BProc, n: PNode, d: var TLoc) =
|
||||||
cgsym(p.module, raiser)
|
cgsym(p.module, raiser)
|
||||||
|
|
||||||
let boundaryCast =
|
let boundaryCast =
|
||||||
if n0t.skipTypes(abstractVarRange).kind in {tyUInt, tyUInt32, tyUInt64} or
|
if n0t.skipTypes(abstractVarRange).kind in {tyUInt, tyUInt32, tyUInt64}:
|
||||||
(n0t.sym != nil and sfSystemModule in n0t.sym.owner.flags and n0t.sym.name.s == "csize"):
|
|
||||||
"(NI64)"
|
"(NI64)"
|
||||||
else:
|
else:
|
||||||
""
|
""
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,7 @@ discard $x0
|
||||||
const x1 = cast[uint](-1)
|
const x1 = cast[uint](-1)
|
||||||
discard $(x1,)
|
discard $(x1,)
|
||||||
|
|
||||||
when not defined(nimPreviewSlimSystem):
|
|
||||||
# bug #13698
|
# bug #13698
|
||||||
let n: csize = 1 # xxx should that be csize_t or is that essential here?
|
|
||||||
doAssert $n.int32 == "1"
|
|
||||||
|
|
||||||
let n2: csize_t = 1
|
let n2: csize_t = 1
|
||||||
doAssert $n2.int32 == "1"
|
doAssert $n2.int32 == "1"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue