mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 10:29:17 +02:00
+ allow local const symbols to override class members in delphi mode
git-svn-id: trunk@7793 -
This commit is contained in:
parent
e94e32d005
commit
d50f869bbd
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user