You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sema: Downgrade diagnostics about potential unavailability of the extended type in an extension declaration when the following conditions are met:
1. The extension is missing explicit availability.
2. The required availability is before the deployment target.
This exception is needed because there are many existing resilient libraries with extensions containing public members and no availability declared for the extension itself. Under existing rules, these decls are not diagnosed because the deployment target of the library is typically high enough that the extended type is implicitly considered available. Now that we're improving availability type checking for resilient libraries, however, these decls are being diagnosed. We need to land the diagnostic without breaking source compatibility so that library authors can identify and fix the issues.
Resolves rdar://92621567
@@ -669,7 +676,7 @@ public protocol PublicProto {}
669
676
extensionNoAvailable:PublicProto{}
670
677
extensionBeforeInliningTarget:PublicProto{}
671
678
extensionAtInliningTarget:PublicProto{}
672
-
extensionBetweenTargets:PublicProto{} // expected-error {{'BetweenTargets' is only available in}} expected-note {{add @available attribute to enclosing extension}}
679
+
extensionBetweenTargets:PublicProto{} // expected-warning {{'BetweenTargets' is only available in}} expected-note {{add @available attribute to enclosing extension}}
673
680
extensionAtDeploymentTarget:PublicProto{} // expected-error {{'AtDeploymentTarget' is only available in}} expected-note {{add @available attribute to enclosing extension}}
674
681
extensionAfterDeploymentTarget:PublicProto{} // expected-error {{'AfterDeploymentTarget' is only available in}} expected-note {{add @available attribute to enclosing extension}}
0 commit comments