(pdr) p x
X = TFoo(@$00007F507D368060) { Bar: <getter: GetBar> }
(pdr) inspect x
[INSPECT] x: TFoo (class, 8 bytes)
[INSPECT] parent chain: TFoo -> TObject
[INSPECT] properties (1):
Bar = <getter: GetBar> [use 'print x.Bar' to evaluate]
(pdr) p x.Bar
x.Bar = -1186891932
program project1;
{$Mode objfpc}
type
TFoo = class
private
function GetBar(AIndex: Integer): integer;
published
property Bar: integer index 2 read GetBar;
end;
function TFoo.GetBar(AIndex: Integer): integer;
begin
Result := AIndex + 100;
end;
var x: TFoo;
begin
x := TFoo.Create;
writeln();
end.
X.Barshould be 102