fixes cast[int8] bug
This commit is contained in:
parent
94013a4cff
commit
dc8924e1a2
1 changed files with 0 additions and 6 deletions
|
|
@ -51,12 +51,6 @@ proc genLiteral(p: BProc, v: PNode, ty: PType): PRope =
|
|||
case skipTypes(ty, abstractVarRange).kind
|
||||
of tyChar, tyInt64, tyNil:
|
||||
result = intLiteral(v.intVal)
|
||||
of tyInt8:
|
||||
result = ropef("((NI8) $1)", [intLiteral(biggestInt(int8(v.intVal)))])
|
||||
of tyInt16:
|
||||
result = ropef("((NI16) $1)", [intLiteral(biggestInt(int16(v.intVal)))])
|
||||
of tyInt32:
|
||||
result = ropef("((NI32) $1)", [intLiteral(biggestInt(int32(v.intVal)))])
|
||||
of tyInt:
|
||||
if (v.intVal >= low(int32)) and (v.intVal <= high(int32)):
|
||||
result = int32Literal(int32(v.intVal))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue