bugfix: conversions to float32 are allowed again but of lower priority
This commit is contained in:
parent
74c24f3e6d
commit
cf689f7472
1 changed files with 3 additions and 3 deletions
|
|
@ -292,10 +292,10 @@ proc handleFloatRange(f, a: PType): TTypeRelation =
|
||||||
if k == f.kind: result = isSubrange
|
if k == f.kind: result = isSubrange
|
||||||
elif isFloatLit(ab): result = isFromIntLit
|
elif isFloatLit(ab): result = isFromIntLit
|
||||||
elif isIntLit(ab): result = isConvertible
|
elif isIntLit(ab): result = isConvertible
|
||||||
elif f.kind == tyFloat32:
|
elif k >= tyFloat and k <= tyFloat128:
|
||||||
# conversion to "float32" is not as good:
|
# conversion to "float32" is not as good:
|
||||||
result = isConvertible
|
if f.kind == tyFloat32: result = isConvertible
|
||||||
elif k >= tyFloat and k <= tyFloat128: result = isIntConv
|
else: result = isIntConv
|
||||||
else: result = isNone
|
else: result = isNone
|
||||||
|
|
||||||
proc isObjectSubtype(a, f: PType): int =
|
proc isObjectSubtype(a, f: PType): int =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue