mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-18 07:06:39 +02:00
* patch by Aleksa Todorovic to solve another issue with nested generics, resolves #17193
git-svn-id: trunk@16496 -
This commit is contained in:
parent
07e3232fef
commit
9dc584efbf
@ -338,6 +338,23 @@ implementation
|
||||
{ Restore symtablestack }
|
||||
symtablestack.free;
|
||||
symtablestack:=oldsymtablestack;
|
||||
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.
|
||||
}
|
||||
tundefineddef.create;
|
||||
end;
|
||||
|
||||
generictypelist.free;
|
||||
|
Loading…
Reference in New Issue
Block a user