mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 17:19:32 +02:00
* fixed web bug #6923 (old 5100): count references to private fields
from non-private properties git-svn-id: trunk@4180 -
This commit is contained in:
parent
85cdb1315d
commit
0d0766a595
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -7208,6 +7208,8 @@ tests/webtbs/tw5036.pp svneol=native#text/plain
|
||||
tests/webtbs/tw5082.pp -text svneol=unset#text/plain
|
||||
tests/webtbs/tw5086.pp -text
|
||||
tests/webtbs/tw5094.pp -text
|
||||
tests/webtbs/tw5100.pp svneol=native#text/plain
|
||||
tests/webtbs/tw5100a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw6203.pp svneol=native#text/plain
|
||||
tests/webtbs/tw6435.pp svneol=native#text/plain
|
||||
tests/webtbs/tw6491.pp svneol=native#text/plain
|
||||
|
@ -89,11 +89,15 @@ implementation
|
||||
case sym.typ of
|
||||
fieldvarsym :
|
||||
begin
|
||||
if not(sp_private in current_object_option) then
|
||||
addsymref(sym);
|
||||
pl.addsym(sl_load,sym);
|
||||
def:=tfieldvarsym(sym).vartype.def;
|
||||
end;
|
||||
procsym :
|
||||
begin
|
||||
if not(sp_private in current_object_option) then
|
||||
addsymref(sym);
|
||||
pl.addsym(sl_call,sym);
|
||||
end;
|
||||
else
|
||||
|
37
tests/webtbs/tw5100.pp
Normal file
37
tests/webtbs/tw5100.pp
Normal file
@ -0,0 +1,37 @@
|
||||
{ %norun }
|
||||
{ %OPT=-Sen }
|
||||
|
||||
unit tw5100;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
|
||||
{ TA }
|
||||
|
||||
TA = class
|
||||
private
|
||||
FT: string;
|
||||
protected
|
||||
property T: string read FT write FT;
|
||||
end;
|
||||
|
||||
TB = class
|
||||
private
|
||||
FT: string;
|
||||
property T: string read FT write FT;
|
||||
protected
|
||||
procedure test;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
procedure tb.test;
|
||||
begin
|
||||
writeln(t);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
25
tests/webtbs/tw5100a.pp
Normal file
25
tests/webtbs/tw5100a.pp
Normal file
@ -0,0 +1,25 @@
|
||||
{ %norun }
|
||||
{ %OPT=-Sen }
|
||||
{ %fail }
|
||||
|
||||
unit tw5100a;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
|
||||
{ TB }
|
||||
|
||||
TB = class
|
||||
private
|
||||
FT: string;
|
||||
property T: string read FT write FT;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user