diff options
author | Araq <rumpf_a@web.de> | 2013-08-30 21:47:55 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-08-30 21:47:55 +0200 |
commit | cf689f7472241fed99ec5678b8c483f206d0f6e4 (patch) | |
tree | e06950d14c8969e887573e17fa5054d0d19b39b6 | |
parent | 74c24f3e6d88d385ae17db5b05bfdd3b121251d7 (diff) | |
download | Nim-cf689f7472241fed99ec5678b8c483f206d0f6e4.tar.gz |
bugfix: conversions to float32 are allowed again but of lower priority
-rw-r--r-- | compiler/sigmatch.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index f7ad376cd..b331a08e5 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -292,10 +292,10 @@ proc handleFloatRange(f, a: PType): TTypeRelation = if k == f.kind: result = isSubrange elif isFloatLit(ab): result = isFromIntLit elif isIntLit(ab): result = isConvertible - elif f.kind == tyFloat32: + elif k >= tyFloat and k <= tyFloat128: # conversion to "float32" is not as good: - result = isConvertible - elif k >= tyFloat and k <= tyFloat128: result = isIntConv + if f.kind == tyFloat32: result = isConvertible + else: result = isIntConv else: result = isNone proc isObjectSubtype(a, f: PType): int = |