make test green

This commit is contained in:
Araq 2019-09-02 10:56:51 +02:00
commit 2396f0ee71
3 changed files with 48 additions and 37 deletions

View file

@ -149,7 +149,7 @@ proc checkConvertible(c: PContext, targetTyp: PType, src: PNode): TConvStatus =
(srcBaseTyp.kind in IntegralTypes):
if targetTyp.isOrdinalType:
if src.kind in nkCharLit..nkUInt64Lit and
src.intVal notin firstOrd(c.config, targetTyp)..lastOrd(c.config, targetTyp):
src.getInt notin firstOrd(c.config, targetTyp)..lastOrd(c.config, targetTyp):
result = convNotInRange
elif src.kind in nkFloatLit..nkFloat64Lit and
(classify(src.floatVal) in {fcNan, fcNegInf, fcInf} or