|
@@ -555,6 +555,7 @@ implementation
|
|
|
genericst: TSymtable;
|
|
|
aprocsym : tprocsym;
|
|
|
popclass : integer;
|
|
|
+ parentdef : tobjectdef;
|
|
|
ImplIntf : TImplementedInterface;
|
|
|
old_parse_generic : boolean;
|
|
|
old_current_structdef: tabstractrecorddef;
|
|
@@ -1053,6 +1054,27 @@ implementation
|
|
|
assigned(current_module.globalsymtable) then
|
|
|
srsym:=tsym(current_module.globalsymtable.Find(sp));
|
|
|
|
|
|
+ { if the symbol isn't assigned, but we're parsing a class or
|
|
|
+ object then check in the parent types for symbols of the same
|
|
|
+ name that are generics and declare the new symbol as a generic
|
|
|
+ dummy symbol }
|
|
|
+
|
|
|
+ if not assigned(srsym) and is_class_or_object(astruct) then
|
|
|
+ begin
|
|
|
+ parentdef:=tobjectdef(astruct).childof;
|
|
|
+ while assigned(parentdef) do
|
|
|
+ begin
|
|
|
+ srsym:=tsym(parentdef.symtable.Find(sp));
|
|
|
+ if assigned(srsym) and (sp_generic_dummy in srsym.symoptions) then
|
|
|
+ begin
|
|
|
+ addgendummy:=true;
|
|
|
+ break;
|
|
|
+ end;
|
|
|
+ parentdef:=parentdef.childof;
|
|
|
+ end;
|
|
|
+ srsym:=nil;
|
|
|
+ end;
|
|
|
+
|
|
|
{ Check if overloaded is a procsym }
|
|
|
if assigned(srsym) then
|
|
|
begin
|