A bit beyond the scope of property wrappers in general but very informational.
@aurimasbavarskis36283 жыл бұрын
Shouldn’t you set wrappedValue in a set by using newValue keyword and not in didSet in your first example? Now it looks like an infinite loop, your value has just been set and you’re setting it again and so on.
Setting a property in its own didSet callback thankfully doesn’t cause the callback to fire again, so you don’t have to worry about accidental infinite self-recursion by Mattt