[fpc-devel] What's the status of Maciej's Smart Pointer enhancements?
Michael Van Canneyt
michael at freepascal.org
Tue May 1 00:29:56 CEST 2018
On Mon, 30 Apr 2018, Anthony Walter wrote:
> Okay, I found a nice work around to allow for circular references on record
> types:
>
> record helpers
>
> type
> JSValue = record
> ...
> end;
>
> JSObject = record
> ...
> end;
>
> JSValueHelper = record helper for JSValue
> function AsObject: JSObject;
> end;
>
> JSObjectHelper= record helper for JSObject
> function GetProperty(const Name: string): JSValue;
> procedure SetProperty(const Name: string; Value: JSValue);
> end;
>
Clever thinking :)
Michael.
More information about the fpc-devel
mailing list