* allow real_2_real conversion for realconstn, fixes 2971

This commit is contained in:
peter 2004-02-15 12:18:22 +00:00
parent cf34a799aa
commit da60da7f06

View File

@ -38,10 +38,10 @@ interface
tcompare_paras_type = ( cp_none, cp_value_equal_const, cp_all,cp_procvar); tcompare_paras_type = ( cp_none, cp_value_equal_const, cp_all,cp_procvar);
tcompare_paras_option = (cpo_allowdefaults,cpo_ignorehidden,cpo_allowconvert,cpo_comparedefaultvalue); tcompare_paras_option = (cpo_allowdefaults,cpo_ignorehidden,cpo_allowconvert,cpo_comparedefaultvalue);
tcompare_paras_options = set of tcompare_paras_option; tcompare_paras_options = set of tcompare_paras_option;
tcompare_defs_option = (cdo_explicit,cdo_check_operator,cdo_allow_variant); tcompare_defs_option = (cdo_explicit,cdo_check_operator,cdo_allow_variant);
tcompare_defs_options = set of tcompare_defs_option; tcompare_defs_options = set of tcompare_defs_option;
tconverttype = ( tconverttype = (
tc_equal, tc_equal,
tc_not_possible, tc_not_possible,
@ -399,8 +399,9 @@ implementation
eq:=te_equal eq:=te_equal
else else
begin begin
if not(cdo_explicit in cdoptions) or if (fromtreetype=realconstn) or
not(m_delphi in aktmodeswitches) then not((cdo_explicit in cdoptions) and
(m_delphi in aktmodeswitches)) then
begin begin
doconv:=tc_real_2_real; doconv:=tc_real_2_real;
{ do we loose precision? } { do we loose precision? }
@ -618,7 +619,7 @@ implementation
end; end;
end; end;
variantdef : variantdef :
begin begin
if (cdo_allow_variant in cdoptions) then if (cdo_allow_variant in cdoptions) then
begin begin
case def_from.deftype of case def_from.deftype of
@ -636,7 +637,7 @@ implementation
end; end;
end; end;
end; end;
end; end;
end; end;
pointerdef : pointerdef :
@ -1019,12 +1020,12 @@ implementation
then we search also the := operator } then we search also the := operator }
if (eq=te_incompatible) and if (eq=te_incompatible) and
( (
{ Check for variants? } { Check for variants? }
( (
(cdo_allow_variant in cdoptions) and (cdo_allow_variant in cdoptions) and
((def_from.deftype=variantdef) or (def_to.deftype=variantdef)) ((def_from.deftype=variantdef) or (def_to.deftype=variantdef))
) or ) or
{ Check for operators? } { Check for operators? }
( (
(cdo_check_operator in cdoptions) and (cdo_check_operator in cdoptions) and
((def_from.deftype in [objectdef,recorddef,arraydef,stringdef,variantdef]) or ((def_from.deftype in [objectdef,recorddef,arraydef,stringdef,variantdef]) or
@ -1266,7 +1267,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.45 2004-02-13 15:42:21 peter Revision 1.46 2004-02-15 12:18:22 peter
* allow real_2_real conversion for realconstn, fixes 2971
Revision 1.45 2004/02/13 15:42:21 peter
* compare_defs_ext has now a options argument * compare_defs_ext has now a options argument
* fixes for variants * fixes for variants