Commits

Devin Coughlin committed f93515fa8d7
Sema: Allow types to conform to protocols that are less available than the type itself. The previous rules for availability checking prevented types from conforming to protocols that were less available than the type itself. This was too restrictive, because we want to allow developers to add additional behavior to their existing classes to conform to new protocols while still employing older functionality from those classes on older OSes: @available(iOS 9.0, *) protocol UIRefrigeratorDelegate { } @available(iOS 8.0, *) class MyViewController : UIViewController, UIRefrigeratorDelegate { } We now support this idiom (and adding conformnces via protocol extensions) by allowing references to potentially unavailable protocols inside inheritance clauses. It is still an availability error to refer to potentially unavailable protocols in other settings -- so, for example, attempting to cast to an unavailable protocol will cause a compile-time error. rdar://problem/21718497 Swift SVN r29958