阅读背景:

我们可以测试符合相同协议的对象在swift中是否完全相同而不进行转换?

来源:互联网 

I was trying to test if two objects generated from a factory were identical, but the compiler does not seem to allow identity checking of objects that merely conform to the same protocol. Casting both objects to AnyObject seems fine however. Is there anyway to avoid what seems like unnecessary casting? I was trying to test if two objects generated f




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: