Browse Source

* don't check for a duplicate internal symbol in inherited symtables

Sven/Sarah Barth 3 years ago
parent
commit
ac4df2b066
1 changed files with 4 additions and 2 deletions
  1. 4 2
      compiler/symtable.pas

+ 4 - 2
compiler/symtable.pas

@@ -1987,8 +1987,10 @@ implementation
 
          { procsym and propertysym have special code
            to override values in inherited classes. For other
-           symbols check for duplicates }
-         if not(sym.typ in [procsym,propertysym]) then
+           symbols check for duplicates (but for internal symbols only in this
+           symtable, not the whole hierarchy) }
+         if not(sym.typ in [procsym,propertysym]) and
+            not (sp_internal in tsym(sym).symoptions) then
            begin
               { but private ids can be reused }
               hsym:=search_struct_member(tobjectdef(defowner),hashedid.id);