|
@@ -258,19 +258,19 @@ implementation
|
|
|
static fields must be initialsed in the class constructor
|
|
|
itself -> add them here }
|
|
|
block:=internalstatements(stat);
|
|
|
- if assigned(tabstractrecorddef(pd.owner.defowner).tcinitcode) then
|
|
|
+ if assigned(pd.struct.tcinitcode) then
|
|
|
begin
|
|
|
- addstatement(stat,tabstractrecorddef(pd.owner.defowner).tcinitcode);
|
|
|
- tabstractrecorddef(pd.owner.defowner).tcinitcode:=nil;
|
|
|
+ addstatement(stat,pd.struct.tcinitcode);
|
|
|
+ pd.struct.tcinitcode:=nil;
|
|
|
end;
|
|
|
- psym:=tsym(tabstractrecorddef(pd.owner.defowner).symtable.find('FPC_INIT_TYPED_CONSTS_HELPER'));
|
|
|
+ psym:=tsym(pd.struct.symtable.find('FPC_INIT_TYPED_CONSTS_HELPER'));
|
|
|
if not assigned(psym) or
|
|
|
(psym.typ<>procsym) or
|
|
|
(tprocsym(psym).procdeflist.count<>1) then
|
|
|
internalerror(2011040301);
|
|
|
tcinitproc:=tprocdef(tprocsym(psym).procdeflist[0]);
|
|
|
addstatement(stat,ccallnode.create(nil,tprocsym(psym),
|
|
|
- tabstractrecorddef(pd.owner.defowner).symtable,nil,[]));
|
|
|
+ pd.struct.symtable,nil,[]));
|
|
|
addstatement(stat,result);
|
|
|
result:=block
|
|
|
end;
|
|
@@ -288,11 +288,11 @@ implementation
|
|
|
else case pd.synthetickind of
|
|
|
tsk_tcinit:
|
|
|
begin
|
|
|
- if assigned(tabstractrecorddef(pd.owner.defowner).tcinitcode) then
|
|
|
+ if assigned(pd.struct.tcinitcode) then
|
|
|
begin
|
|
|
block:=internalstatements(stat);
|
|
|
- addstatement(stat,tabstractrecorddef(pd.owner.defowner).tcinitcode);
|
|
|
- tabstractrecorddef(pd.owner.defowner).tcinitcode:=nil;
|
|
|
+ addstatement(stat,pd.struct.tcinitcode);
|
|
|
+ pd.struct.tcinitcode:=nil;
|
|
|
addstatement(stat,result);
|
|
|
result:=block
|
|
|
end
|