swift-memberwise-init-macro
swift-memberwise-init-macro copied to clipboard
Swift Macro for enhanced automatic inits.
### Description Swift provides non-public initializers that default optionals to `nil`. A design tenet of MemberwiseInit has been to strive to be a pure superset of Swift's memberwise initializer, and...
### Description Consider this code: ```swift @MemberwiseInit public struct A { let x: Int public struct B {} } extension A.B {} ``` ### Checklist - [X] If possible, I've...
### Description Thanks for making this macro. I'd like to use it unfortunately the generated initializer doesn't work inside the #Preview macro. Example: ```swift import SwiftUI import MemberwiseInit @MemberwiseInit struct...
Hi, thanks for making this macro—it solves a recurring problem really thoroughly! This PR attempts to give `MemberwiseInit` the ability to synthesize initializers that are either `@usableFromInline` or `@inlinable`. This...