mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:19:24 +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_constructor(def_from) then
|
||||
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
|
||||
{ same definition -> exact }
|
||||
if (def_from=def_to) then
|
||||
@ -3170,7 +3175,8 @@ implementation
|
||||
eq:=te_incompatible;
|
||||
{ var_para_allowed will return te_equal and te_convert_l1 to
|
||||
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
|
||||
else
|
||||
para_allowed(eq,currpt,def_to);
|
||||
|
Loading…
Reference in New Issue
Block a user