Avatar
@swift-5.1.5 protocol Initializable { init() } struct MyStruct: Initializable { init() {} } protocol P { associatedtype Assoc func foo() -> Assoc func bar() -> Assoc } struct S: P { func foo() -> some Initializable { return MyStruct() } func bar() -> Assoc { return Assoc() } }