mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Downgrade diagnostics about unavailable requirements in swiftinterfaces.
Historically, we've allowed protocol requirements to be written with `@_spi_available` which makes them unavailable to clients of the public `.swiftinterface`. Don't diagnose this when checking a `.swiftinterface` since there's nothing the client can do about it. Resolves rdar://146334181.
This commit is contained in:
@@ -64,3 +64,16 @@ public enum EnumWithAssociatedValues {
|
||||
@available(macOS 51, *)
|
||||
case introducedAtDeploymentWithAssoc(Int)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: public protocol Proto
|
||||
public protocol Proto {
|
||||
// CHECK: @available(macOS 99, *)
|
||||
// CHECK-NEXT: func reqIntroducedAfterDeployment()
|
||||
@available(macOS 99, *)
|
||||
func reqIntroducedAfterDeployment()
|
||||
|
||||
// CHECK: @available(macOS, unavailable)
|
||||
// CHECK-NEXT: func reqIntroducedAsSPIAfterDeployment()
|
||||
@_spi_available(macOS 99, *)
|
||||
func reqIntroducedAsSPIAfterDeployment()
|
||||
}
|
||||
Reference in New Issue
Block a user