|
@@ -283,19 +283,32 @@ implementation
|
|
|
(not is_signed(ld) and
|
|
|
(rd.size >= ld.size))) then
|
|
|
begin
|
|
|
- inserttypeconv(left,right.resultdef);
|
|
|
- ld:=torddef(left.resultdef);
|
|
|
- end;
|
|
|
- if (ld.ordtype in [u8bit,u16bit,u32bit,u64bit]) and
|
|
|
+ if rd.size<uinttype.size then
|
|
|
+ begin
|
|
|
+ inserttypeconv(left,uinttype);
|
|
|
+ inserttypeconv(right,uinttype);
|
|
|
+ end
|
|
|
+ else
|
|
|
+ inserttypeconv(left,rd);
|
|
|
+ resultdef:=right.resultdef;
|
|
|
+ end
|
|
|
+ else if (ld.ordtype in [u8bit,u16bit,u32bit,u64bit]) and
|
|
|
((is_constintnode(right) and
|
|
|
(tordconstnode(right).value >= 0) and
|
|
|
(tordconstnode(right).value <= get_max_value(ld))) or
|
|
|
(not is_signed(rd) and
|
|
|
(ld.size >= rd.size))) then
|
|
|
- begin
|
|
|
- inserttypeconv(right,left.resultdef);
|
|
|
- rd:=torddef(right.resultdef);
|
|
|
- end;
|
|
|
+ begin
|
|
|
+ if ld.size<uinttype.size then
|
|
|
+ begin
|
|
|
+ inserttypeconv(left,uinttype);
|
|
|
+ inserttypeconv(right,uinttype);
|
|
|
+ end
|
|
|
+ else
|
|
|
+ inserttypeconv(right,ld);
|
|
|
+ resultdef:=left.resultdef;
|
|
|
+ end
|
|
|
+ else
|
|
|
|
|
|
{ when there is one currency value, everything is done
|
|
|
using currency }
|