Просмотр исходного кода

* 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 лет назад
Родитель
Сommit
36e5d02e8e
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      compiler/symtable.pas

+ 4 - 2
compiler/symtable.pas

@@ -2768,8 +2768,10 @@ implementation
                  internalerror(200501152);
                { unit uses count }
                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);
              end;
        end;