address the comments

This commit is contained in:
narimiran 2019-08-27 14:49:32 +02:00
commit 329e169e96
3 changed files with 4 additions and 7 deletions

View file

@ -293,8 +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, "cannot convert " & $result.floatVal &
" to " & typeToString(typ))
localError(c.config, n.info, errFloatToString % [$n.floatVal, typeToString(typ)])
else:
changeType(c, r1, typ, check=true)
result = r1