From d50f869bbd216840dd8d09e42d2c3a9e89eee761 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 24 Jun 2007 15:14:47 +0000 Subject: [PATCH] + allow local const symbols to override class members in delphi mode git-svn-id: trunk@7793 - --- compiler/symtable.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/symtable.pas b/compiler/symtable.pas index b4ac46fa3c..e38ae011fc 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -1168,7 +1168,10 @@ implementation if not is_funcret_sym(sym) and (defowner.typ=procdef) and assigned(tprocdef(defowner)._class) and - (tprocdef(defowner).owner.defowner=tprocdef(defowner)._class) then + (tprocdef(defowner).owner.defowner=tprocdef(defowner)._class) and + { delphi allows local typed consts. having the same name as class members, probably + a delphi bug, but some delphi code depends on it } + not((m_duplicate_names in current_settings.modeswitches) and (sym.typ=staticvarsym)) then result:=tprocdef(defowner)._class.symtable.checkduplicate(hashedid,sym); end;