Browse Source

* don't export types that have been merely renamed (and thus are part of another unit and potentially another package altogether)

git-svn-id: trunk@34340 -
svenbarth 9 years ago
parent
commit
f1cdb5c4e9
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/pkgutil.pas

+ 4 - 1
compiler/pkgutil.pas

@@ -168,7 +168,10 @@ implementation
 
 
   procedure export_typedef(def:tdef;symtable:tsymtable;global:boolean);
   procedure export_typedef(def:tdef;symtable:tsymtable;global:boolean);
     begin
     begin
-      if not (global or is_class(def)) or (df_internal in def.defoptions) then
+      if not (global or is_class(def)) or
+          (df_internal in def.defoptions) or
+          { happens with type renaming declarations ("abc = xyz") }
+          (def.owner<>symtable) then
         exit;
         exit;
       if ds_rtti_table_written in def.defstates then
       if ds_rtti_table_written in def.defstates then
         exportname(def.rtti_mangledname(fullrtti));
         exportname(def.rtti_mangledname(fullrtti));