Stop emitting conditions for Swift 5.5-era features into textual interfaces

The "#if compiler(>=5.3) && $AsyncAwait" checks were necessary for
staging in concurrency in Swift 5.5. At this point, it's safe to assume
that any compiler that tries to read a generated Swift interface file will
support concurrency, so we can stop emitting these guards.
This commit is contained in:
Doug Gregor
2024-02-13 09:56:25 -08:00
parent de885df00e
commit bae1026b77
5 changed files with 64 additions and 193 deletions

View File

@@ -7,8 +7,8 @@
import Distributed
// CHECK: #if compiler(>=5.3) && $Actors
// CHECK-NEXT: @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
// CHECK-NOT: #if compiler(>=5.3) && $Actors
// CHECK: @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
// CHECK-NEXT: distributed public actor DA {
@available(SwiftStdlib 5.7, *)
public distributed actor DA {
@@ -30,18 +30,14 @@ public distributed actor DA {
// CHECK-NEXT: get
// CHECK-NEXT: }
}
// CHECK: #endif
// CHECK: #if compiler(>=5.3) && $Actors
// CHECK-NEXT: @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
// CHECK-NOT: #if compiler(>=5.3) && $Actors
// CHECK: @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
// CHECK-NEXT: extension Library.DA : Distributed.DistributedActor {}
// CHECK-NEXT: #endif
// CHECK: #if compiler(>=5.3) && $Actors
// CHECK-NEXT: @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
// CHECK-NOT: #if compiler(>=5.3) && $Actors
// CHECK: @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
// CHECK-NEXT: extension Library.DA : Swift.Encodable {}
// CHECK-NEXT: #endif
// CHECK: #if compiler(>=5.3) && $Actors
// CHECK-NEXT: @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
// CHECK-NOT: #if compiler(>=5.3) && $Actors
// CHECK: @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
// CHECK-NEXT: extension Library.DA : Swift.Decodable {}
// CHECK-NEXT: #endif