mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 18:49:16 +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/tw5082.pp -text svneol=unset#text/plain
|
||||||
tests/webtbs/tw5086.pp -text
|
tests/webtbs/tw5086.pp -text
|
||||||
tests/webtbs/tw5094.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/tw6203.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw6435.pp svneol=native#text/plain
|
tests/webtbs/tw6435.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw6491.pp svneol=native#text/plain
|
tests/webtbs/tw6491.pp svneol=native#text/plain
|
||||||
|
@ -89,11 +89,15 @@ implementation
|
|||||||
case sym.typ of
|
case sym.typ of
|
||||||
fieldvarsym :
|
fieldvarsym :
|
||||||
begin
|
begin
|
||||||
|
if not(sp_private in current_object_option) then
|
||||||
|
addsymref(sym);
|
||||||
pl.addsym(sl_load,sym);
|
pl.addsym(sl_load,sym);
|
||||||
def:=tfieldvarsym(sym).vartype.def;
|
def:=tfieldvarsym(sym).vartype.def;
|
||||||
end;
|
end;
|
||||||
procsym :
|
procsym :
|
||||||
begin
|
begin
|
||||||
|
if not(sp_private in current_object_option) then
|
||||||
|
addsymref(sym);
|
||||||
pl.addsym(sl_call,sym);
|
pl.addsym(sl_call,sym);
|
||||||
end;
|
end;
|
||||||
else
|
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