* In Delphi mode throw a conversion error when trying to typecast a pointer to a procdef when they use different memory models.

git-svn-id: trunk@45856 -
This commit is contained in:
yury 2020-07-25 17:13:29 +00:00
parent cbe38d7664
commit 72dc2145e9

View File

@ -1683,7 +1683,8 @@ implementation
{ to procedure variables }
if (m_pointer_2_procedure in current_settings.modeswitches) and
is_void(tpointerdef(def_from).pointeddef) and
tprocvardef(def_to).is_addressonly then
tprocvardef(def_to).is_addressonly and
tprocvardef(def_to).compatible_with_pointerdef_size(tpointerdef(def_from)) then
begin
doconv:=tc_equal;
eq:=te_convert_l1;