Closed gohanlon closed 1 year ago
MemberwiseInit can be made to support property wrappers like SwiftUI's @Binding with the addition of two new arguments:
@Binding
import SwiftUI @MemberwiseInit struct CounterView: View { @Init(assignee: "self._count", type: Binding<Int>) @Binding var count: Int }
With that, MemberwiseInit can provide the expected initializer for a @Binding-wrapped property:
internal init( property: Binding<Int> ) { self._count = count }
This expressiveness may also support the use of other framework-vended property wrappers, custom property wrappers and macros.
MemberwiseInit can be made to support property wrappers like SwiftUI's
@Binding
with the addition of two new arguments:With that, MemberwiseInit can provide the expected initializer for a
@Binding
-wrapped property:This expressiveness may also support the use of other framework-vended property wrappers, custom property wrappers and macros.