mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-30 18:42:34 +02:00
* fixed wrong "assigned but not used" note for class and interface
(the latter via a type cast) variables from which only fields are read git-svn-id: trunk@4181 -
This commit is contained in:
parent
0d0766a595
commit
30ee3416e8
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -5762,6 +5762,7 @@ tests/tbs/tb0497c.pp -text
|
||||
tests/tbs/tb0498.pp svneol=native#text/plain
|
||||
tests/tbs/tb0499.pp svneol=native#text/plain
|
||||
tests/tbs/tb0500.pp svneol=native#text/plain
|
||||
tests/tbs/tb0501.pp svneol=native#text/plain
|
||||
tests/tbs/ub0060.pp svneol=native#text/plain
|
||||
tests/tbs/ub0069.pp svneol=native#text/plain
|
||||
tests/tbs/ub0119.pp svneol=native#text/plain
|
||||
|
@ -790,7 +790,11 @@ implementation
|
||||
p:=tunarynode(p).left;
|
||||
end;
|
||||
subscriptn :
|
||||
p:=tunarynode(p).left;
|
||||
begin
|
||||
if is_class_or_interface(tunarynode(p).left.resulttype.def) then
|
||||
newstate := vs_read;
|
||||
p:=tunarynode(p).left;
|
||||
end;
|
||||
vecn:
|
||||
begin
|
||||
set_varstate(tbinarynode(p).right,vs_read,[vsf_must_be_valid]);
|
||||
|
22
tests/tbs/tb0501.pp
Normal file
22
tests/tbs/tb0501.pp
Normal file
@ -0,0 +1,22 @@
|
||||
{ %OPT=-Sen }
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
type
|
||||
tc = class
|
||||
procedure t;
|
||||
private
|
||||
fleft: tc;
|
||||
end;
|
||||
|
||||
procedure tc.t;
|
||||
var
|
||||
oldroot: tc;
|
||||
begin
|
||||
fleft := nil;
|
||||
oldroot := nil;
|
||||
oldroot.fleft := nil;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user