Skip to content

Commit

Permalink
fix test for 32bit
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Dec 27, 2020
1 parent da6f0fd commit 8aa6471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/vmgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ proc sameConstant*(a, b: PNode): bool =
of nkIdent: result = a.ident.id == b.ident.id
of nkCharLit..nkUInt64Lit: result = a.intVal == b.intVal
of nkFloatLit..nkFloat64Lit:
result = cast[int](a.floatVal) == cast[int](b.floatVal)
result = cast[uint64](a.floatVal) == cast[uint64](b.floatVal)
# refs bug #16469
# if we wanted to only distinguish 0.0 vs -0.0:
# if a.floatVal == 0.0: result = cast[int](a.floatVal) == cast[int](b.floatVal)
# if a.floatVal == 0.0: result = cast[uint64](a.floatVal) == cast[uint64](b.floatVal)
# else: result = a.floatVal == b.floatVal
of nkStrLit..nkTripleStrLit: result = a.strVal == b.strVal
of nkType, nkNilLit: result = a.typ == b.typ
Expand Down

0 comments on commit 8aa6471

Please sign in to comment.