Browse Source

fcl-passrc: useanalyzer: fixed skipping generic members

mattias 3 months ago
parent
commit
afe6f1270b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      packages/fcl-passrc/src/pasuseanalyzer.pas

+ 7 - 0
packages/fcl-passrc/src/pasuseanalyzer.pas

@@ -2354,6 +2354,8 @@ begin
       begin
       Proc:=TPasProcedure(Member);
       ProcScope:=Member.CustomData as TPasProcedureScope;
+      if (ScopeModule=nil) and not Resolver.IsFullySpecialized(Proc) then
+        continue;
       if Proc.IsOverride and (ProcScope.OverriddenProc<>nil) then
         begin
         // this is an override
@@ -2409,6 +2411,11 @@ begin
       begin
       // include published
       if not FirstTime then continue;
+      if Member is TPasGenericType then
+      begin
+        if not Resolver.IsFullySpecialized(TPasGenericType(Member)) then
+          continue;
+      end;
       UseTypeInfo(Member);
       end
     else if Mode=paumElement then