Swift 2, protocol extensions & respondsToSelector

前端 未结 1 1681
心在旅途
心在旅途 2021-01-18 10:32

I am not sure, it looks to me that it is some kind of bug or bad implementation with protocol extensions in Swift 2.0.

I have protocolA, protocolB extending protoco

相关标签:
1条回答
  • 2021-01-18 11:13

    Interesting. Looks like a bug to me. It does recognize functions on a class, but not on extension. No matter what type Instance has. Moreover without an extension code would not be compilable, since protocol methods are non optional. So really looks like a bug/feature? in responds to selector implementation.

    0 讨论(0)
提交回复
热议问题