浏览代码

* Allow hidden units to be found when replaying generic

Michael VAN CANNEYT 2 年之前
父节点
当前提交
b31bf50369
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      compiler/pgenutil.pas

+ 8 - 1
compiler/pgenutil.pas

@@ -2702,6 +2702,8 @@ uses
       unitsyms : TFPHashObjectList;
       unitsyms : TFPHashObjectList;
       sym : tsym;
       sym : tsym;
       i : Integer;
       i : Integer;
+      n : string;
+
     begin
     begin
       if not assigned(genericdef) then
       if not assigned(genericdef) then
         internalerror(200705151);
         internalerror(200705151);
@@ -2728,7 +2730,12 @@ uses
           begin
           begin
             sym:=tsym(hmodule.globalsymtable.symlist[i]);
             sym:=tsym(hmodule.globalsymtable.symlist[i]);
             if sym.typ=unitsym then
             if sym.typ=unitsym then
-              unitsyms.add(upper(sym.realname),sym);
+              begin
+              n:=sym.realname;
+              if (Copy(n,1,7)='$hidden') then
+                Delete(n,1,7);
+              unitsyms.add(upper(n),sym);
+              end;
           end;
           end;
       { add all units if we are specializing inside the current unit (as the
       { add all units if we are specializing inside the current unit (as the
         generic could have been declared in the implementation part), but load
         generic could have been declared in the implementation part), but load