* also check elementtype of arraydef for forwarddef

This commit is contained in:
peter 1999-12-10 10:04:21 +00:00
parent 768200b8d0
commit 903ac0f0dc

View File

@ -863,6 +863,7 @@ unit pdecl;
var
hpd,pd : pdef;
stpos : tfileposinfo;
again : boolean;
begin
{ Check only typesyms or record/object fields }
case psym(p)^.typ of
@ -876,7 +877,15 @@ unit pdecl;
else
exit;
end;
repeat
again:=false;
case pd^.deftype of
arraydef :
begin
{ elementtype could also be defined using a forwarddef }
pd:=parraydef(pd)^.elementtype.def;
again:=true;
end;
pointerdef,
classrefdef :
begin
@ -899,7 +908,7 @@ unit pdecl;
if assigned(srsym) and
(srsym^.typ=typesym) then
begin
ppointerdef(pd)^.pointertype.def:=ptypesym(srsym)^.restype.def;
ppointerdef(pd)^.pointertype:=ptypesym(srsym)^.restype;
{$ifdef GDB}
if (cs_debuginfo in aktmoduleswitches) and assigned(debuglist) and
(psym(p)^.owner^.symtabletype in [globalsymtable,staticsymtable]) then
@ -930,6 +939,7 @@ unit pdecl;
if not(psym(p)^.owner^.symtabletype in [objectsymtable,recordsymtable]) then
pobjectdef(pd)^.symtable^.foreach({$ifndef TP}@{$endif}resolve_type_forward);
end;
until not again;
end;
{ reads a type declaration to the symbol table }
@ -1170,7 +1180,10 @@ unit pdecl;
end.
{
$Log$
Revision 1.174 1999-12-01 12:42:32 peter
Revision 1.175 1999-12-10 10:04:21 peter
* also check elementtype of arraydef for forwarddef
Revision 1.174 1999/12/01 12:42:32 peter
* fixed bug 698
* removed some notes about unused vars