make bootstrapping work under the new integer promotion rules

This commit is contained in:
Andreas Rumpf 2017-09-15 09:56:30 +02:00
commit 8432eb6e67

View file

@ -669,7 +669,7 @@ proc astGenRepr*(n: NimNode): string {.compileTime, benign.} =
t = x t = x
result = newString(len) result = newString(len)
for j in countdown(len-1, 0): for j in countdown(len-1, 0):
result[j] = HexChars[t and 0xF] result[j] = HexChars[int(t and 0xF)]
t = t shr 4 t = t shr 4
# handle negative overflow # handle negative overflow
if t == 0 and x < 0: t = -1 if t == 0 and x < 0: t = -1