mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 19:29:18 +02:00
* count references to symbols accessed via properties (fixes bug #4826)
git-svn-id: trunk@2959 -
This commit is contained in:
parent
ed910b5d31
commit
3bc040cc45
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6754,6 +6754,7 @@ tests/webtbs/tw4768.pp -text
|
|||||||
tests/webtbs/tw4778.pp svneol=native#text/plain
|
tests/webtbs/tw4778.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4789.pp svneol=native#text/plain
|
tests/webtbs/tw4789.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4809.pp svneol=native#text/plain
|
tests/webtbs/tw4809.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw4826.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4893a.pp svneol=native#text/plain
|
tests/webtbs/tw4893a.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4893b.pp svneol=native#text/plain
|
tests/webtbs/tw4893b.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4893c.pp svneol=native#text/plain
|
tests/webtbs/tw4893c.pp svneol=native#text/plain
|
||||||
|
@ -152,6 +152,7 @@ implementation
|
|||||||
case plist^.sltype of
|
case plist^.sltype of
|
||||||
sl_load :
|
sl_load :
|
||||||
begin
|
begin
|
||||||
|
addsymref(plist^.sym);
|
||||||
if not assigned(st) then
|
if not assigned(st) then
|
||||||
st:=plist^.sym.owner;
|
st:=plist^.sym.owner;
|
||||||
{ p1 can already contain the loadnode of
|
{ p1 can already contain the loadnode of
|
||||||
@ -172,7 +173,10 @@ implementation
|
|||||||
p1:=cloadnode.create(plist^.sym,st);
|
p1:=cloadnode.create(plist^.sym,st);
|
||||||
end;
|
end;
|
||||||
sl_subscript :
|
sl_subscript :
|
||||||
|
begin
|
||||||
|
addsymref(plist^.sym);
|
||||||
p1:=csubscriptnode.create(plist^.sym,p1);
|
p1:=csubscriptnode.create(plist^.sym,p1);
|
||||||
|
end;
|
||||||
sl_typeconv :
|
sl_typeconv :
|
||||||
p1:=ctypeconvnode.create_explicit(p1,plist^.tt);
|
p1:=ctypeconvnode.create_explicit(p1,plist^.tt);
|
||||||
sl_absolutetype :
|
sl_absolutetype :
|
||||||
@ -1032,6 +1036,7 @@ implementation
|
|||||||
if membercall then
|
if membercall then
|
||||||
include(callflags,cnf_member_call);
|
include(callflags,cnf_member_call);
|
||||||
p1:=ccallnode.create(paras,tprocsym(tpropertysym(sym).writeaccess.firstsym^.sym),st,p1,callflags);
|
p1:=ccallnode.create(paras,tprocsym(tpropertysym(sym).writeaccess.firstsym^.sym),st,p1,callflags);
|
||||||
|
addsymref(tpropertysym(sym).writeaccess.firstsym^.sym);
|
||||||
paras:=nil;
|
paras:=nil;
|
||||||
consume(_ASSIGNMENT);
|
consume(_ASSIGNMENT);
|
||||||
{ read the expression }
|
{ read the expression }
|
||||||
|
31
tests/webtbs/tw4826.pp
Normal file
31
tests/webtbs/tw4826.pp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ %OPT=-vn -Sen }
|
||||||
|
|
||||||
|
{ Source provided for Free Pascal Bug Report 4826 }
|
||||||
|
{ Submitted by "Ivo Steinmann" on 2006-02-20 }
|
||||||
|
{ e-mail: isteinmann@bluewin.ch }
|
||||||
|
program bug;
|
||||||
|
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
type
|
||||||
|
TTest = class
|
||||||
|
private
|
||||||
|
FFoobar: Integer;
|
||||||
|
protected
|
||||||
|
property Foobar: Integer read FFoobar write FFoobar;
|
||||||
|
public
|
||||||
|
constructor Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TTest.Create;
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
Foobar := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Test: TTest;
|
||||||
|
begin
|
||||||
|
Test := TTest.Create;
|
||||||
|
Test.Free;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user