summary refs log tree commit diff stats
path: root/compiler/semfold.nim
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2022-06-13 15:01:40 +0800
committerGitHub <noreply@github.com>2022-06-13 09:01:40 +0200
commitab477075860364db2690a0411c0b2c330532042f (patch)
treed3b018dc13c7a95a7d5eb0fa60959aeaae8392c2 /compiler/semfold.nim
parent2f4900615ab0c42c9608910dd30a14be52455f91 (diff)
downloadNim-ab477075860364db2690a0411c0b2c330532042f.tar.gz
[semfold] fix #19199; properly fold uint to float conversion (#19890) [backport]
fix #19199; properly fold float conversion
Diffstat (limited to 'compiler/semfold.nim')
-rw-r--r--compiler/semfold.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semfold.nim b/compiler/semfold.nim
index d2bbc63be..72c8abaa9 100644
--- a/compiler/semfold.nim
+++ b/compiler/semfold.nim
@@ -409,7 +409,7 @@ proc foldConv(n, a: PNode; idgen: IdGenerator; g: ModuleGraph; check = false): P
       rangeCheck(n, getInt(result), g)
   of tyFloat..tyFloat64:
     case srcTyp.kind
-    of tyInt..tyInt64, tyEnum, tyBool, tyChar:
+    of tyInt..tyInt64, tyUInt..tyUInt64, tyEnum, tyBool, tyChar:
       result = newFloatNodeT(toFloat64(getOrdValue(a)), n, g)
     else:
       result = a