[fpc-devel] What's the status of Maciej's Smart Pointer enhancements?

Anthony Walter sysrpl at gmail.com
Tue May 1 00:01:39 CEST 2018


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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180430/760b13da/attachment.html>


More information about the fpc-devel mailing list