* fix generics parsing for new symtable

git-svn-id: trunk@5220 -
This commit is contained in:
peter 2006-11-04 12:13:06 +00:00
parent 3cae449fda
commit 86f1fe11d6

View File

@ -624,7 +624,8 @@ implementation
storepos, storepos,
procstartfilepos : tfileposinfo; procstartfilepos : tfileposinfo;
searchagain : boolean; searchagain : boolean;
st : TSymtable; st,
genericst : TSymtable;
aprocsym : tprocsym; aprocsym : tprocsym;
popclass : boolean; popclass : boolean;
ImplIntf : TImplementedInterface; ImplIntf : TImplementedInterface;
@ -837,12 +838,12 @@ implementation
replay the tokens to generate the body } replay the tokens to generate the body }
if not assigned(pd._class.genericdef) then if not assigned(pd._class.genericdef) then
internalerror(200512113); internalerror(200512113);
st:=pd._class.genericdef.GetSymtable(gs_record); genericst:=pd._class.genericdef.GetSymtable(gs_record);
if not assigned(st) then if not assigned(genericst) then
internalerror(200512114); internalerror(200512114);
{ We are parsing the same objectdef, the def index numbers { We are parsing the same objectdef, the def index numbers
are the same } are the same }
pd.genericdef:=tstoreddef(st.DefList[st.DefList.IndexOf(pd)]); pd.genericdef:=tstoreddef(genericst.DefList[pd.owner.DefList.IndexOf(pd)]);
if not assigned(pd.genericdef) or if not assigned(pd.genericdef) or
(pd.genericdef.typ<>procdef) then (pd.genericdef.typ<>procdef) then
internalerror(200512115); internalerror(200512115);