|
@@ -367,18 +367,18 @@ implementation
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
- { There is comment few lines before ie 200512115
|
|
|
- saying "We are parsing the same objectdef, the def index numbers
|
|
|
- are the same". This is wrong (index numbers are not same)
|
|
|
- in case there is specialization (S2 in this case) inside
|
|
|
- specialized generic (G2 in this case) which is equal to
|
|
|
- some previous specialization (S1 in this case). In that case,
|
|
|
- new symbol is not added to currently specialized type
|
|
|
- (S in this case) for that specializations (S2 in this case),
|
|
|
- and this results in that specialization and generic definition
|
|
|
- don't have same number of elements in their object symbol tables.
|
|
|
- This patch adds undefined def to ensure that those
|
|
|
- two symbol tables will have same number of elements.
|
|
|
+ { There is comment few lines before ie 200512115
|
|
|
+ saying "We are parsing the same objectdef, the def index numbers
|
|
|
+ are the same". This is wrong (index numbers are not same)
|
|
|
+ in case there is specialization (S2 in this case) inside
|
|
|
+ specialized generic (G2 in this case) which is equal to
|
|
|
+ some previous specialization (S1 in this case). In that case,
|
|
|
+ new symbol is not added to currently specialized type
|
|
|
+ (S in this case) for that specializations (S2 in this case),
|
|
|
+ and this results in that specialization and generic definition
|
|
|
+ don't have same number of elements in their object symbol tables.
|
|
|
+ This patch adds undefined def to ensure that those
|
|
|
+ two symbol tables will have same number of elements.
|
|
|
}
|
|
|
tundefineddef.create;
|
|
|
end;
|
|
@@ -938,7 +938,7 @@ implementation
|
|
|
lv,hv : TConstExprInt;
|
|
|
old_block_type : tblock_type;
|
|
|
dospecialize : boolean;
|
|
|
- structdef: tabstractrecorddef;
|
|
|
+ structdef: tdef;
|
|
|
begin
|
|
|
old_block_type:=block_type;
|
|
|
dospecialize:=false;
|
|
@@ -949,13 +949,13 @@ implementation
|
|
|
structdef:=current_structdef;
|
|
|
while assigned(structdef) and (structdef.typ in [objectdef,recorddef]) do
|
|
|
begin
|
|
|
- if (structdef.objname^=pattern) then
|
|
|
+ if (tabstractrecorddef(structdef).objname^=pattern) then
|
|
|
begin
|
|
|
consume(_ID);
|
|
|
def:=structdef;
|
|
|
exit;
|
|
|
end;
|
|
|
- structdef:=tabstractrecorddef(structdef.owner.defowner);
|
|
|
+ structdef:=tdef(structdef.owner.defowner);
|
|
|
end;
|
|
|
end;
|
|
|
{ Generate a specialization in FPC mode? }
|