* fixes #12042

* make tests green again
This commit is contained in:
Andreas Rumpf 2019-08-29 19:09:54 +02:00 • committed by GitHub
commit 2a3b056314
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 3 deletions

View file

@ -293,7 +293,7 @@ proc fitRemoveHiddenConv(c: PContext, typ: PType, n: PNode): PNode =
result.info = n.info
result.typ = typ
if not floatRangeCheck(result.floatVal, typ):
localError(c.config, n.info, errFloatToString % [$n.floatVal, typeToString(typ)])
localError(c.config, n.info, errFloatToString % [$result.floatVal, typeToString(typ)])
else:
changeType(c, r1, typ, check=true)
result = r1