From ff0b560fe422caa2692f77799dd382e566a89fdc Mon Sep 17 00:00:00 2001 From: Sven/Sarah Barth Date: Sat, 5 Feb 2022 20:45:34 +0100 Subject: [PATCH] * set the flag that the symtable contains a generic at the end of the corresponding block of types_dec() to ensure that the owner is assigned correctly --- compiler/pdecl.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index d6a47ced29..abc48086ad 100644 --- a/compiler/pdecl.pas +++ b/compiler/pdecl.pas @@ -886,9 +886,6 @@ implementation { update the definition of the type } if assigned(hdef) then begin - if df_generic in hdef.defoptions then - { flag parent symtables that they now contain a generic } - hdef.owner.includeoption(sto_has_generic); if assigned(hdef.typesym) then begin istyperenaming:=true; @@ -1154,6 +1151,10 @@ implementation attributes to this def } if not istyperenaming or isunique then trtti_attribute_list.bind(rtti_attrs_def,tstoreddef(hdef).rtti_attribute_list); + + if df_generic in hdef.defoptions then + { flag parent symtables that they now contain a generic } + hdef.owner.includeoption(sto_has_generic); end; if isgeneric and (not(hdef.typ in [objectdef,recorddef,arraydef,procvardef])