It took a long time, I mean years, but it finally happened. I stumbled on a struct which had a property of the same type.
At first, it is kind of interesting that the replies property compiles fine, although it is a collection of the same type. I guess it is so because arrayโs storage type is a reference type.
The simplest workaround is to use a closure for capturing the actual value.
Or we could go for using a boxed wrapper type.
Or if we prefer property wrappers, using that instead.
Then there are also options like changing the struct into class instead, but that is something to consider. Or finally, creating a
All in all, it is fascinating how something simple like this actually has a pretty complex background.