Your comments
On FixInsight 2016.03, this problem seems to be reproduced. See below codes.
unit Unit2;
interface
uses
System.Generics.Collections;
type
TChild = class(TObject)
end;
TChildList = TObjectList<TChild>;
TParent = class(TObject)
private
FChildList: TObjectList<TChild>;
function GetItems(Index: Integer): TChild;
public
constructor Create;
destructor Destroy; override;
property Items[Index: Integer]: TChild read GetItems;
end;
implementation
constructor TParent.Create;
begin
inherited;
FChildList := TObjectList<TChild>.Create(True);
end;
destructor TParent.Destroy;
begin
FChildList.Free;
inherited;
end;
function TParent.GetItems(Index: Integer): TChild;
begin
Result := FChildList.Items[Index]; // W527 Property access in getter or setter
// Result := FChildList[Index]; // OK
end;
end.
Customer support service by UserEcho
On FixInsight 2016.04, W527 false positive problem is resolved. Thank you.