makes more tests green

This commit is contained in:
Andreas Rumpf 2019-09-02 22:03:06 +02:00
commit d70e292571
4 changed files with 11 additions and 19 deletions

View file

@ -396,13 +396,13 @@ proc leValueConv*(a, b: PNode): bool =
case a.kind
of nkCharLit..nkUInt64Lit:
case b.kind
of nkCharLit..nkUInt64Lit: result = a.intVal <= b.intVal
of nkCharLit..nkUInt64Lit: result = a.getInt <= b.getInt
of nkFloatLit..nkFloat128Lit: result = a.intVal <= round(b.floatVal).int
else: result = false #internalError(a.info, "leValueConv")
of nkFloatLit..nkFloat128Lit:
case b.kind
of nkFloatLit..nkFloat128Lit: result = a.floatVal <= b.floatVal
of nkCharLit..nkUInt64Lit: result = a.floatVal <= toFloat(int(b.intVal))
of nkCharLit..nkUInt64Lit: result = a.floatVal <= toFloat64(b.getInt)
else: result = false # internalError(a.info, "leValueConv")
else: result = false # internalError(a.info, "leValueConv")