mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
First attempt to fix bug report #40537
This commit is contained in:
parent
8146443336
commit
f39cfc75fc
@ -3035,6 +3035,11 @@ implementation
|
|||||||
not is_array_of_const(def_from) and
|
not is_array_of_const(def_from) and
|
||||||
not is_array_constructor(def_from) then
|
not is_array_constructor(def_from) then
|
||||||
eq:=te_equal
|
eq:=te_equal
|
||||||
|
else
|
||||||
|
{ if var or out parameter type but paranode not is_valid_for_var }
|
||||||
|
if (currpara.varspez in [vs_var,vs_out]) and not valid_for_var(currpt.left,false)
|
||||||
|
and (currpara.vardef.typ<>formaldef) then
|
||||||
|
eq:=te_incompatible
|
||||||
else
|
else
|
||||||
{ same definition -> exact }
|
{ same definition -> exact }
|
||||||
if (def_from=def_to) then
|
if (def_from=def_to) then
|
||||||
@ -3170,7 +3175,8 @@ implementation
|
|||||||
eq:=te_incompatible;
|
eq:=te_incompatible;
|
||||||
{ var_para_allowed will return te_equal and te_convert_l1 to
|
{ var_para_allowed will return te_equal and te_convert_l1 to
|
||||||
make a difference for best matching }
|
make a difference for best matching }
|
||||||
var_para_allowed(eq,currpt.resultdef,currpara.vardef,currpt.left)
|
if valid_for_var(currpt.left,false) or (currpara.vardef.typ=formaldef) then
|
||||||
|
var_para_allowed(eq,currpt.resultdef,currpara.vardef,currpt.left)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
para_allowed(eq,currpt,def_to);
|
para_allowed(eq,currpt,def_to);
|
||||||
|
Loading…
Reference in New Issue
Block a user