More issues between code-completion and inherited protected methotds (now showing too much); follow up issue 0014027
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
See issue #14027 (closed)
Now it is showing too many identifiers in the completion (which it a lot better than to little imho.
In the example completion should work on:
self.FComponentStyle
f.FComponentStyle
b.FComponentStyle
TBar(c).FComponentStyle
but not on:
c.FComponentStyle
The rule seems that within a class, you can see inherited protected methods/members on this class (self or any other variable of the exact class, or of a class that inherits from this class).
But you can not see inherited protected methods/members of classes that are only a base class of the current class (even if they have the method/member).
Additional information:
program Project1;
{$mode objfpc}{$H+}
uses Classes, SysUtils;
type
TFoo = Class(TComponent)
procedure Foo;
end;
TBar = class(tfoo)
end;
procedure TFoo.Foo;
var
c: TComponent;
f: TFoo;
b: TBar;
begin
f.FComponentStyle := [];
b.FComponentStyle := [];
TBar(c).FComponentStyle := [];
c.FComponentStyle := [];
end;
begin
end.
Mantis conversion info:
- Mantis ID: 14249
- Version: 0.9.27 (SVN)
- Target version: 1.0.0
- LazTarget: 1.0