[fpc-pascal] with in classes/records
Ryan Joseph
ryan at thealchemistguild.com
Sun Sep 9 10:48:11 CEST 2018
It seems syntacticly possible that default properties could be recursive by having a default property reference a record/class with another default property. Should that be allowed?
type
THelperB = record
field: integer;
end;
type
THelperA = record
obj: THelperB;
property helperB: THelperB read obj write obj; default;
end;
type
TWrapper = record
obj: THelperA;
property helperA: THelperA read obj write obj; default;
end;
var
wrapper: TWrapper;
begin
wrapper.field := 100; // wrapper.helperA.helperB.field := 100
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list