> On May 6, 2021, at 5:41 PM, Martin Frb via fpc-devel > <firstname.lastname@example.org> wrote: > > You can already cause ref circles, no classes needed. > > type > TR = record > a: array of TR; > end; > > var > x: TR; > begin > SetLength(x.a,99); > x.a := x; > end.
This can be detected at compile and at least give a warning. "a" is a member of TR and the element type of "a" is TR, then we're assigning TR to said array. It's that simple I think. Regards, Ryan Joseph _______________________________________________ fpc-devel maillist - email@example.com https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel