Peer into the types of declarations to find async/actors/etc.

This commit is contained in:
Doug Gregor
2021-02-08 22:50:48 -08:00
parent 627e4f03a3
commit 643ce71a09
2 changed files with 44 additions and 5 deletions

View File

@@ -63,6 +63,16 @@ extension OldSchool: UnsafeConcurrentValue { }
// CHECK-NEXT: }
// CHECK-NEXT: #endif
// CHECK: #if compiler(>=5.3) && $AsyncAwait
// CHECK-NEXT: func runSomethingSomewhere
// CHECK-NEXT: #endif
public func runSomethingSomewhere(body: () async -> Void) { }
// CHECK: #if compiler(>=5.3) && $Actors
// CHECK-NEXT: func stage
// CHECK-NEXT: #endif
public func stage(with actor: MyActor) { }
// CHECK: #if compiler(>=5.3) && $MarkerProtocol
// CHECK-NEXT: extension FeatureTest.MyActor : Swift.ConcurrentValue {}
// CHECK-NEXT: #endif