From 74c24f3e6d88d385ae17db5b05bfdd3b121251d7 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 30 Aug 2013 21:40:47 +0200 Subject: conversions to float32 are allowed again but of lower priority --- compiler/sigmatch.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler') 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 = -- cgit 1.4.1-2-gfad0