mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 09:50:18 +02:00
compiler: improve comparison for property and getter. it was possible to declare a class property with regular method for the getter because of cpo_ignorehidden flag
git-svn-id: trunk@14650 -
This commit is contained in:
parent
a24b84c11b
commit
e9214c1826
@ -449,7 +449,9 @@ implementation
|
||||
non default calling conventions which might change the hidden stuff;
|
||||
see tw3216.pp (FK) }
|
||||
p.propaccesslist[palt_read].procdef:=Tprocsym(sym).Find_procdef_bypara(readprocdef.paras,p.propdef,[cpo_allowdefaults,cpo_ignorehidden]);
|
||||
if not assigned(p.propaccesslist[palt_read].procdef) then
|
||||
if not assigned(p.propaccesslist[palt_read].procdef) or
|
||||
{ because of cpo_ignorehidden we need to compare if it is a static class method and we have a class property }
|
||||
((sp_static in p.symoptions) <> ([po_classmethod,po_staticmethod]<=tprocdef(p.propaccesslist[palt_read].procdef).procoptions)) then
|
||||
Message(parser_e_ill_property_access_sym);
|
||||
end;
|
||||
fieldvarsym :
|
||||
|
Loading…
Reference in New Issue
Block a user