summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-08-29 19:09:54 +0200
committerGitHub <noreply@github.com>2019-08-29 19:09:54 +0200
commit2a3b0563141f2cfdee4cbeef85167c25610ff71f (patch)
tree2a32c413877f8e83d4f92e3a922b4aaef83250c9 /compiler/semstmts.nim
parentd0e5bd2305db719b0c9acb6a017c8aa579a2f246 (diff)
downloadNim-2a3b0563141f2cfdee4cbeef85167c25610ff71f.tar.gz
fixes #12042 (#12083)
* fixes #12042

* make tests green again
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index b22dc7952..5a0aac40e 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -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