* fixes #13744 * improve style Co-authored-by: cooldome <ariabushenko@gmail.ru>
This commit is contained in:
parent
46c827be6a
commit
182d3c16e3
4 changed files with 44 additions and 1 deletions
|
|
@ -463,6 +463,12 @@ proc opConv(c: PCtx; dest: var TFullReg, src: TFullReg, desttyp, srctyp: PType):
|
|||
value = (value shl srcDist) shr srcDist
|
||||
value = (value shl destDist) shr destDist
|
||||
dest.intVal = cast[BiggestInt](value)
|
||||
of tyBool:
|
||||
dest.ensureKind(rkInt)
|
||||
dest.intVal =
|
||||
case skipTypes(srctyp, abstractRange).kind
|
||||
of tyFloat..tyFloat64: int(src.floatVal != 0.0)
|
||||
else: int(src.intVal != 0)
|
||||
of tyFloat..tyFloat64:
|
||||
dest.ensureKind(rkFloat)
|
||||
case skipTypes(srctyp, abstractRange).kind
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue