From 32ec5af60a5d89fca314c3b432d225f1e248953f Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 19 Nov 2014 23:38:35 +0100 Subject: fixes #1053, fixes #924 --- compiler/ccgexprs.nim | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'compiler') diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index bced6d50f..0bf2359c5 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -20,7 +20,7 @@ proc int64Literal(i: BiggestInt): PRope = proc uint64Literal(i: uint64): PRope = toRope($i & "ULL") proc intLiteral(i: BiggestInt): PRope = - if (i > low(int32)) and (i <= high(int32)): + if i > low(int32) and i <= high(int32): result = toRope(i) elif i == low(int32): # Nim has the same bug for the same reasons :-) @@ -39,7 +39,7 @@ proc int32Literal(i: int): PRope = proc genHexLiteral(v: PNode): PRope = # hex literals are unsigned in C # so we don't generate hex literals any longer. - if not (v.kind in {nkIntLit..nkUInt64Lit}): + if v.kind notin {nkIntLit..nkUInt64Lit}: internalError(v.info, "genHexLiteral") result = intLiteral(v.intVal) @@ -224,9 +224,9 @@ proc optAsgnLoc(a: TLoc, t: PType, field: PRope): TLoc = proc genOptAsgnTuple(p: BProc, dest, src: TLoc, flags: TAssignmentFlags) = let newflags = if src.k == locData: - flags + { needToCopy } + flags + {needToCopy} elif tfShallow in dest.t.flags: - flags - { needToCopy } + flags - {needToCopy} else: flags for i in 0 ..