From 63326f19f077554a2e345f65168005ed38b3a15d Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 10 May 2012 08:21:06 +0200 Subject: [PATCH] fixes #111; however may introduce other problems --- compiler/semexprs.nim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 4e9afd585..967d60531 100755 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -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: