mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 01:29:29 +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/tw4789.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/tw4893b.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4893c.pp svneol=native#text/plain
|
||||
|
@ -152,6 +152,7 @@ implementation
|
||||
case plist^.sltype of
|
||||
sl_load :
|
||||
begin
|
||||
addsymref(plist^.sym);
|
||||
if not assigned(st) then
|
||||
st:=plist^.sym.owner;
|
||||
{ p1 can already contain the loadnode of
|
||||
@ -172,7 +173,10 @@ implementation
|
||||
p1:=cloadnode.create(plist^.sym,st);
|
||||
end;
|
||||
sl_subscript :
|
||||
p1:=csubscriptnode.create(plist^.sym,p1);
|
||||
begin
|
||||
addsymref(plist^.sym);
|
||||
p1:=csubscriptnode.create(plist^.sym,p1);
|
||||
end;
|
||||
sl_typeconv :
|
||||
p1:=ctypeconvnode.create_explicit(p1,plist^.tt);
|
||||
sl_absolutetype :
|
||||
@ -1032,6 +1036,7 @@ implementation
|
||||
if membercall then
|
||||
include(callflags,cnf_member_call);
|
||||
p1:=ccallnode.create(paras,tprocsym(tpropertysym(sym).writeaccess.firstsym^.sym),st,p1,callflags);
|
||||
addsymref(tpropertysym(sym).writeaccess.firstsym^.sym);
|
||||
paras:=nil;
|
||||
consume(_ASSIGNMENT);
|
||||
{ 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