mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 21:29:19 +02:00
* avoid cyclic overloaded list for operators
This commit is contained in:
parent
7f4168fb0a
commit
6800fa46bc
@ -416,7 +416,7 @@
|
|||||||
procedure tprocsym.deref;
|
procedure tprocsym.deref;
|
||||||
var
|
var
|
||||||
t : ttoken;
|
t : ttoken;
|
||||||
last : pprocdef;
|
last,pd : pprocdef;
|
||||||
begin
|
begin
|
||||||
resolvedef(pdef(definition));
|
resolvedef(pdef(definition));
|
||||||
if (definition^.proctypeoption=potype_operator) then
|
if (definition^.proctypeoption=potype_operator) then
|
||||||
@ -428,8 +428,20 @@
|
|||||||
if (name=overloaded_names[t]) then
|
if (name=overloaded_names[t]) then
|
||||||
begin
|
begin
|
||||||
if assigned(overloaded_operators[t]) then
|
if assigned(overloaded_operators[t]) then
|
||||||
last^.nextoverloaded:=overloaded_operators[t]^.definition;
|
begin
|
||||||
|
pd:=overloaded_operators[t]^.definition;
|
||||||
|
{ test if not already in list, bug report by KC Wong PM }
|
||||||
|
while assigned(pd) do
|
||||||
|
if pd=last then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
pd:=pd^.nextoverloaded;
|
||||||
|
if pd=last then
|
||||||
|
break;
|
||||||
|
last^.nextoverloaded:=overloaded_operators[t]^.definition;
|
||||||
|
end;
|
||||||
overloaded_operators[t]:=@self;
|
overloaded_operators[t]:=@self;
|
||||||
|
break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2125,7 +2137,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.140 2000-03-01 00:03:10 pierre
|
Revision 1.141 2000-04-03 14:50:05 pierre
|
||||||
|
* avoid cyclic overloaded list for operators
|
||||||
|
|
||||||
|
Revision 1.140 2000/03/01 00:03:10 pierre
|
||||||
* fixes for locals in inlined procedures
|
* fixes for locals in inlined procedures
|
||||||
fix for bug797
|
fix for bug797
|
||||||
+ stabs generation for inlined paras and locals
|
+ stabs generation for inlined paras and locals
|
||||||
|
Loading…
Reference in New Issue
Block a user