summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-08-30 21:40:47 +0200
committerAraq <rumpf_a@web.de>2013-08-30 21:40:47 +0200
commit74c24f3e6d88d385ae17db5b05bfdd3b121251d7 (patch)
tree8b4bbeffeb1cd746f2e44e0b315e8fbbcbd983a2 /compiler
parent0c133b3f0273c0beb978c890fd3f47b8f7aff5b2 (diff)
downloadNim-74c24f3e6d88d385ae17db5b05bfdd3b121251d7.tar.gz
conversions to float32 are allowed again but of lower priority
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sigmatch.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index a37b47366..f7ad376cd 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -293,9 +293,9 @@ proc handleFloatRange(f, a: PType): TTypeRelation =
     elif isFloatLit(ab): result = isFromIntLit
     elif isIntLit(ab): result = isConvertible
     elif f.kind == tyFloat32:
-      # no conversion to "float32" as that might lose precision
-      result = isNone
-    elif k >= tyFloat and k <= tyFloat128: result = isConvertible
+      # conversion to "float32" is not as good:
+      result = isConvertible
+    elif k >= tyFloat and k <= tyFloat128: result = isIntConv
     else: result = isNone
   
 proc isObjectSubtype(a, f: PType): int =