mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Check unavailable from async in interface file
We need to check the feature availability of _unavailableFromAsync before it gets picked up in the swift interface file. This updates the compiler to provide the necessary wrappings for that check.
This commit is contained in:
@@ -177,4 +177,12 @@ public func unsafeInheritExecutor() async {}
|
||||
@_specialize(exported: true, availability: SwiftStdlib 5.1, *; where T == Int)
|
||||
public func multipleSuppressible<T>(value: T) async {}
|
||||
|
||||
// CHECK: #if compiler(>=5.3) && $UnavailableFromAsync
|
||||
// CHECK-NEXT: @_unavailableFromAsync(message: "Test") public func unavailableFromAsyncFunc()
|
||||
// CHECK-NEXT: #else
|
||||
// CHECK-NEXT: public func unavailableFromAsyncFunc()
|
||||
// CHECK-NEXT: #endif
|
||||
@_unavailableFromAsync(message: "Test")
|
||||
public func unavailableFromAsyncFunc() { }
|
||||
|
||||
// CHECK-NOT: extension FeatureTest.MyActor : Swift.Sendable
|
||||
|
||||
Reference in New Issue
Block a user