* Consider conversion from integer to integer te_equal, if the base types

are equal and the range of the from type fits in the to type. I.e.
    conversion from -10..10 to shortint is considered equal. This is correct
    because in this case, the from type can be used wherever the to type is
    used, i.e. the compiler never needs to do conversion at compile or run
    time.

git-svn-id: trunk@7814 -
This commit is contained in:
daniel 2007-06-25 20:57:21 +00:00
parent 201fc56655
commit 504d845e86

View File

@ -225,8 +225,8 @@ implementation
u8bit,u16bit,u32bit,u64bit,
s8bit,s16bit,s32bit,s64bit:
begin
if (torddef(def_from).low=torddef(def_to).low) and
(torddef(def_from).high=torddef(def_to).high) then
if (torddef(def_from).low>=torddef(def_to).low) and
(torddef(def_from).high<=torddef(def_to).high) then
eq:=te_equal
else
begin