Why SwiftUI @State property can be initialized inside `init` this OTHER way:

Yes, but that shouldn't be the case, should it? This is about the initialization of the property wrapper, so the setter shouldn't be involved at all.

This looks like a bug to me. The compiler is rejecting code that should be legal according to the out-of-line init rules in SE-0258. cc @hborla

@rayx Thank you for the code sample. It's good to have a self-contained example that doesn't rely on SwiftUI.

1 Like