Avatar
omochimetaru 5/17/2019 8:47 AM
@swift-5.1.5 protocol P { func print() } extension Int : P { func print() { Swift.print("Int \(self)") } } protocol PHolder { associatedtype PType: P func take1() -> PType func take2() -> PType } struct S : PHolder { func take1() -> some P { return 3 } func take2() -> some P { return 2 } }