浏览代码

* addsymref: do not directly check the top level symtable against the current module's global symtable as that would be false for a specialize symtable; check the module id instead

git-svn-id: trunk@34413 -
svenbarth 9 年之前
父节点
当前提交
36e5d02e8e
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      compiler/symtable.pas

+ 4 - 2
compiler/symtable.pas

@@ -2768,8 +2768,10 @@ implementation
                  internalerror(200501152);
                  internalerror(200501152);
                { unit uses count }
                { unit uses count }
                inc(current_module.unitmap[tglobalsymtable(owner).moduleid].refs);
                inc(current_module.unitmap[tglobalsymtable(owner).moduleid].refs);
-               { symbol is imported from another unit }
-               if current_module.globalsymtable<>owner then
+               { Note: don't check the symtable directly as owner might be
+                       a specialize symtable which is a globalsymtable as well }
+               if current_module.globalsymtable.moduleid<>owner.moduleid then
+                 { symbol is imported from another unit }
                  current_module.addimportedsym(sym);
                  current_module.addimportedsym(sym);
              end;
              end;
        end;
        end;