fixes #111; however may introduce other problems

This commit is contained in:
Araq
2012-05-10 08:21:06 +02:00
parent ccc4ed2c5a
commit 63326f19f0

View File

@@ -1305,7 +1305,12 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
of nkNilLit:
result.typ = getSysType(tyNil)
of nkIntLit:
if result.typ == nil: result.typ = getSysType(tyInt)
if result.typ == nil:
let i = result.intVal
if i >= low(int32) and i <= high(int32):
result.typ = getSysType(tyInt)
else:
result.typ = getSysType(tyInt64)
of nkInt8Lit:
if result.typ == nil: result.typ = getSysType(tyInt8)
of nkInt16Lit: