mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 11:09:19 +02:00
* count references to class fields/messages from outside that class'
own methods (mantis #8090) git-svn-id: trunk@5870 -
This commit is contained in:
parent
6f66f75f69
commit
45e9633f97
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7949,6 +7949,7 @@ tests/webtbs/tw7975a.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw8018.pp svneol=native#text/plain
|
tests/webtbs/tw8018.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw8028.pp svneol=native#text/plain
|
tests/webtbs/tw8028.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw8049.pp svneol=native#text/plain
|
tests/webtbs/tw8049.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw8090.pp svneol=native#text/plain
|
||||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||||
tests/webtbs/uw0555.pp svneol=native#text/plain
|
tests/webtbs/uw0555.pp svneol=native#text/plain
|
||||||
|
@ -1630,6 +1630,7 @@ implementation
|
|||||||
if assigned(srsym) and
|
if assigned(srsym) and
|
||||||
tsym(srsym).is_visible_for_object(contextclassh,currentclassh) then
|
tsym(srsym).is_visible_for_object(contextclassh,currentclassh) then
|
||||||
begin
|
begin
|
||||||
|
addsymref(srsym);
|
||||||
result:=true;
|
result:=true;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -1661,6 +1662,7 @@ implementation
|
|||||||
srdef:=def;
|
srdef:=def;
|
||||||
srsym:=tprocdef(def).procsym;
|
srsym:=tprocdef(def).procsym;
|
||||||
srsymtable:=classh.symtable;
|
srsymtable:=classh.symtable;
|
||||||
|
addsymref(srsym);
|
||||||
result:=true;
|
result:=true;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -1692,6 +1694,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
srsym:=tprocdef(def).procsym;
|
srsym:=tprocdef(def).procsym;
|
||||||
srsymtable:=classh.symtable;
|
srsymtable:=classh.symtable;
|
||||||
|
addsymref(srsym);
|
||||||
result:=true;
|
result:=true;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
47
tests/webtbs/tw8090.pp
Normal file
47
tests/webtbs/tw8090.pp
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{ %opt=-Sen }
|
||||||
|
program notusedbug;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils
|
||||||
|
{ add your units here };
|
||||||
|
|
||||||
|
type
|
||||||
|
TA = class
|
||||||
|
private
|
||||||
|
FC: integer;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TB }
|
||||||
|
|
||||||
|
TB = class
|
||||||
|
private FA: TA;
|
||||||
|
public
|
||||||
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TB }
|
||||||
|
|
||||||
|
constructor TB.Create;
|
||||||
|
begin
|
||||||
|
FA := TA.Create;
|
||||||
|
FA.FC := 4;
|
||||||
|
writeln(FA.FC);
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TB.Destroy;
|
||||||
|
begin
|
||||||
|
FA.Free;
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
b: TB;
|
||||||
|
|
||||||
|
begin
|
||||||
|
b := TB.Create;
|
||||||
|
b.Free;
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user