Extending existing protocol to conform to another protocol

核能气质少年 提交于 2019-12-12 17:02:04

问题


Hello my goal here is to extend (in swift 3) a protocol I have in a framework to conform to another Protocol

protocol SomeProtocol {}
protocol SomeOtherProtocol {}
extension SomeOtherProtocol: SomeProtocol {}

The problem here is that I get an error: "Extension of protocol 'SomeOtherProtocol' cannot have an inheritance clause" If this is not possible how do I achieve such thing or what's the "swift way"?

来源:https://stackoverflow.com/questions/44425503/extending-existing-protocol-to-conform-to-another-protocol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!