Closed gohanlon closed 1 year ago
MemberwiseInit's behavior doesn't match Swift's memberwise init:
struct S { var v: String? } _ = S() @MemberwiseInit struct M { var v: String? } _ = M() // 🛑 Compiler error: Missing argument for parameter 'v' in call
MemberwiseInit provides this initializer:
internal init( v: String ) { self.v = v }
but, to match Swift's memberwise init, MemberwiseInit should provide:
internal init( v: String? = nil ) { self.v = v }
(Thanks, @AndreiChenchik!)
main
0.1.0
Description
MemberwiseInit's behavior doesn't match Swift's memberwise init:
MemberwiseInit provides this initializer:
but, to match Swift's memberwise init, MemberwiseInit should provide:
(Thanks, @AndreiChenchik!)
Checklist
main
branch of this package.swift-memberwise-init-macro version information
0.1.0