Skip to content

Commit

Permalink
revive nim-lang#16627 now that csources_v1 was merged
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Apr 29, 2021
1 parent 1640508 commit 3cee236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/semtypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ proc semRangeAux(c: PContext, n: PNode, prev: PType): PType =
else:
result.n.add semConstExpr(c, range[i])

if (result.n[0].kind in {nkFloatLit..nkFloat64Lit} and classify(result.n[0].floatVal) == fcNan) or
(result.n[1].kind in {nkFloatLit..nkFloat64Lit} and classify(result.n[1].floatVal) == fcNan):
if (result.n[0].kind in {nkFloatLit..nkFloat64Lit} and result.n[0].floatVal.isNaN) or
(result.n[1].kind in {nkFloatLit..nkFloat64Lit} and result.n[1].floatVal.isNaN):
localError(c.config, n.info, "NaN is not a valid start or end for a range")

if weakLeValue(result.n[0], result.n[1]) == impNo:
Expand Down

0 comments on commit 3cee236

Please sign in to comment.