make bootstrapping work under the new integer promotion rules

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

View File

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