On Saturday, 19 March 2022 at 05:25:01 UTC, Era Scarecrow wrote:
On Saturday, 19 March 2022 at 00:16:48 UTC, user1234 wrote:
That crashes because of the creation of `Bar b` member, which itself has a Bar b member, which itself...

Mhmm... So There's Foo with Bar b, which has Bar b which has Bar b which... just keeps going over and over again.

It appears to me that it only crashes when you fully run out of memory then. Much like a function calling itself and you exhaust all your stack space.

I'd suggest avoiding self-inheritance. No one wants to be their own Grandpa

I think OP is learning OOP. His error looks like that for the least.

Reply via email to