Browse Source

* 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

Sven/Sarah Barth 3 years ago
parent
commit
a764c035b2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/symdef.pas

+ 2 - 2
compiler/symdef.pas

@@ -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);