* 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:
Jonas Maebe 2006-07-14 15:34:02 +00:00
parent 85cdb1315d
commit 0d0766a595
4 changed files with 68 additions and 0 deletions

2
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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
View 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.