[swift-evolution] Passing class protocols to functions accepting AnyObject

Charles Srstka cocoadev at charlessoft.com
Mon Dec 5 11:31:15 CST 2016


> On Dec 4, 2016, at 11:49 PM, Derrick Ho <wh1pch81n at gmail.com> wrote:
> 
> Does the following expression evaluate to true?
> 
> p is AnyObject
> 
> If it does then you may have found a bug.

Not only does it evaluate to true, the compiler warns me that "'is' test is always true”.

Charles



More information about the swift-evolution mailing list