|
@@ -3173,20 +3173,18 @@ implementation
|
|
|
else
|
|
|
begin
|
|
|
if ((((resultdef.typ=objectdef) and (left.resultdef.typ=classrefdef))
|
|
|
- or ((left.resultdef.typ=objectdef) and (resultdef.typ=classrefdef)))
|
|
|
- and not (nf_internal in flags)) then
|
|
|
+ or ((left.resultdef.typ=objectdef) and (resultdef.typ=classrefdef))) and
|
|
|
+ not (nf_internal in flags)) then
|
|
|
if not(m_delphi in current_settings.modeswitches) then
|
|
|
CGMessage2(type_e_illegal_type_conversion,left.resultdef.typename,resultdef.typename)
|
|
|
else
|
|
|
- begin
|
|
|
- CGMessage2(type_w_dangerous_type_conversion,left.resultdef.typename,resultdef.typename);
|
|
|
- { perform target-specific explicit typecast checks }
|
|
|
- if target_specific_explicit_typeconv then
|
|
|
- begin
|
|
|
- result:=simplify(false);
|
|
|
- exit;
|
|
|
- end;
|
|
|
- end;
|
|
|
+ CGMessage2(type_w_dangerous_type_conversion,left.resultdef.typename,resultdef.typename);
|
|
|
+ end;
|
|
|
+ { perform target-specific explicit typecast checks }
|
|
|
+ if target_specific_explicit_typeconv then
|
|
|
+ begin
|
|
|
+ result:=simplify(false);
|
|
|
+ exit;
|
|
|
end;
|
|
|
end;
|
|
|
end
|