From ac4df2b0660b1f7896ab20d30a7f845f446d5b72 Mon Sep 17 00:00:00 2001 From: Sven/Sarah Barth Date: Sat, 5 Feb 2022 19:36:49 +0100 Subject: [PATCH] * don't check for a duplicate internal symbol in inherited symtables --- compiler/symtable.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/symtable.pas b/compiler/symtable.pas index ff29e0856d..f9dce70ee2 100644 --- a/compiler/symtable.pas +++ b/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);