Skip to content

Commit

Permalink
remove hack for deprecated csize in compiler (nim-lang#20463)
Browse files Browse the repository at this point in the history
* remove hack for deprecated csize in compiler

* remove test
  • Loading branch information
metagn authored Oct 1, 2022
1 parent 96c5586 commit 24b81e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions compiler/ccgexprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2252,8 +2252,7 @@ proc genRangeChck(p: BProc, n: PNode, d: var TLoc) =
cgsym(p.module, raiser)

let boundaryCast =
if n0t.skipTypes(abstractVarRange).kind in {tyUInt, tyUInt32, tyUInt64} or
(n0t.sym != nil and sfSystemModule in n0t.sym.owner.flags and n0t.sym.name.s == "csize"):
if n0t.skipTypes(abstractVarRange).kind in {tyUInt, tyUInt32, tyUInt64}:
"(NI64)"
else:
""
Expand Down
6 changes: 1 addition & 5 deletions tests/misc/tunsignedconv.nim
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ discard $x0
const x1 = cast[uint](-1)
discard $(x1,)

when not defined(nimPreviewSlimSystem):
# bug #13698
let n: csize = 1 # xxx should that be csize_t or is that essential here?
doAssert $n.int32 == "1"

# bug #13698
let n2: csize_t = 1
doAssert $n2.int32 == "1"

Expand Down

0 comments on commit 24b81e9

Please sign in to comment.