mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 09:10:53 +02:00
* assigned(procvar) fix for delphi mode, fixes tb0430
This commit is contained in:
parent
bdc6feb73d
commit
74cd4c01b2
@ -252,6 +252,7 @@ implementation
|
|||||||
function statement_syssym(l : longint) : tnode;
|
function statement_syssym(l : longint) : tnode;
|
||||||
var
|
var
|
||||||
p1,p2,paras : tnode;
|
p1,p2,paras : tnode;
|
||||||
|
err,
|
||||||
prev_in_args : boolean;
|
prev_in_args : boolean;
|
||||||
begin
|
begin
|
||||||
prev_in_args:=in_args;
|
prev_in_args:=in_args;
|
||||||
@ -367,15 +368,16 @@ implementation
|
|||||||
|
|
||||||
in_assigned_x :
|
in_assigned_x :
|
||||||
begin
|
begin
|
||||||
|
err:=false;
|
||||||
consume(_LKLAMMER);
|
consume(_LKLAMMER);
|
||||||
in_args:=true;
|
in_args:=true;
|
||||||
p1:=comp_expr(true);
|
p1:=comp_expr(true);
|
||||||
if not codegenerror then
|
if not codegenerror then
|
||||||
begin
|
begin
|
||||||
{ load procvar if a procedure is passed }
|
{ With tp procvars we allways need to load a
|
||||||
|
procvar when it is passed }
|
||||||
if (m_tp_procvar in aktmodeswitches) and
|
if (m_tp_procvar in aktmodeswitches) and
|
||||||
(p1.nodetype=calln) and
|
(p1.nodetype=calln) then
|
||||||
(is_void(p1.resulttype.def)) then
|
|
||||||
load_procvar_from_calln(p1);
|
load_procvar_from_calln(p1);
|
||||||
|
|
||||||
case p1.resulttype.def.deftype of
|
case p1.resulttype.def.deftype of
|
||||||
@ -384,13 +386,29 @@ implementation
|
|||||||
classrefdef : ;
|
classrefdef : ;
|
||||||
objectdef :
|
objectdef :
|
||||||
if not is_class_or_interface(p1.resulttype.def) then
|
if not is_class_or_interface(p1.resulttype.def) then
|
||||||
|
begin
|
||||||
Message(parser_e_illegal_parameter_list);
|
Message(parser_e_illegal_parameter_list);
|
||||||
|
err:=true;
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
Message(parser_e_illegal_parameter_list);
|
Message(parser_e_illegal_parameter_list);
|
||||||
|
err:=true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
err:=true;
|
||||||
|
if not err then
|
||||||
|
begin
|
||||||
p2:=ccallparanode.create(p1,nil);
|
p2:=ccallparanode.create(p1,nil);
|
||||||
p2:=geninlinenode(in_assigned_x,false,p2);
|
p2:=geninlinenode(in_assigned_x,false,p2);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
p1.free;
|
||||||
|
p2:=cerrornode.create;
|
||||||
|
end;
|
||||||
consume(_RKLAMMER);
|
consume(_RKLAMMER);
|
||||||
statement_syssym:=p2;
|
statement_syssym:=p2;
|
||||||
end;
|
end;
|
||||||
@ -2285,7 +2303,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.95 2002-11-30 11:12:48 carl
|
Revision 1.96 2002-12-11 22:40:36 peter
|
||||||
|
* assigned(procvar) fix for delphi mode, fixes tb0430
|
||||||
|
|
||||||
|
Revision 1.95 2002/11/30 11:12:48 carl
|
||||||
+ checking for symbols used with hint directives is done mostly in pexpr
|
+ checking for symbols used with hint directives is done mostly in pexpr
|
||||||
only now
|
only now
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user