<div dir="ltr"><span style="font-size:12.8px">Hello,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">What is the current view on inheriting non-objc protocol from objc protocol? Is it supported? Is it a valid construct?<br><div><br></div><div><br></div><div><div>import Foundation</div><div><br></div><div>@objc protocol Base {}<br></div><div><br></div><div>protocol Some : Base {}<br></div><div><br></div><div>class Nada : NSObject, Some {}<br></div><div><br></div><div>let x: NSObject = Nada()<br></div><div><br></div><div>print(&quot;Nada is Some? \(x is Some)&quot;)<br></div><div>print(&quot;Nada is Base? \(x is Base)&quot;)</div></div><div><br></div><div><br></div></div><div style="font-size:12.8px">There are two statements in the docs on @objc attribute:</div><div style="font-size:12.8px">a) The compiler also implicitly adds the objc attribute to a class that inherits from another class marked with the objc attribute or a class defined in Objective-C.</div><div style="font-size:12.8px">b) Protocols marked with the objc attribute can’t inherit from protocols that aren’t.<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">But they don&#39;t spec the other way round about protocols.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Currently the output is</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>swift main.swift</div><div>Nada is Some? true</div><div>Nada is Base? false</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Which is not what I would expect.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Here is extended example: <a href="http://stackoverflow.com/q/42023977" target="_blank">http://stackoverflow.<wbr>com/q/42023977</a></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>swift --version</div><div>Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)</div><div>Target: x86_64-apple-macosx10.9</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">(same on 3.1-dev)</div></div>