fixes #150; next steps for proper unsigned support

This commit is contained in:
Araq 2012-07-03 00:59:36 +02:00
commit 8ef48a34e5
7 changed files with 44 additions and 34 deletions

View file

@ -390,7 +390,8 @@ proc transformConv(c: PTransf, n: PNode): PTransNode =
var dest = skipTypes(n.typ, abstractVarRange)
var source = skipTypes(n.sons[1].typ, abstractVarRange)
case dest.kind
of tyInt..tyInt64, tyEnum, tyChar, tyBool, tyUInt..tyUInt64:
of tyInt..tyInt64, tyEnum, tyChar, tyBool, tyUInt8..tyUInt32:
# we don't include uint and uint64 here as these are no ordinal types ;-)
if not isOrdinalType(source):
# XXX int64 -> float conversion?
result = transformSons(c, n)