* if the symbol belongs to the current def also consider it a specialization if it's a nameless type symbol from an implicit function specialization as their owner gets changed to the function itself

This commit is contained in:
Sven/Sarah Barth 2022-05-21 19:04:37 +02:00
parent 6a6a17717a
commit a764c035b2

View File

@ -2465,7 +2465,7 @@ implementation
{ sym must be either a type or const }
if not (sym.typ in [symconst.typesym,symconst.constsym]) then
internalerror(2014050903);
if sym.owner.defowner<>self then
if (sym.owner.defowner<>self) or (sp_generic_unnamed_type in sym.symoptions) then
exit(false);
if (sym.typ=symconst.constsym) and (sp_generic_const in sym.symoptions) then
exit(false);
@ -2506,7 +2506,7 @@ implementation
{ sym must be either a type or const }
if not (sym.typ in [symconst.typesym,symconst.constsym]) then
internalerror(2014050904);
if sym.owner.defowner<>self then
if (sym.owner.defowner<>self) or (sp_generic_unnamed_type in sym.symoptions) then
exit(true);
if (sym.typ=symconst.constsym) and (sp_generic_const in sym.symoptions) then
exit(true);