Skip to content

Commit 909218b

Browse files
authored
Merge pull request #37146 from hamishknight/completion-handler-async-interface
[AST] Mark @completionHandlerAsync user-inaccessible
2 parents 776c8ed + a2b5f68 commit 909218b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

include/swift/AST/Attr.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ SIMPLE_DECL_ATTR(reasync, AtReasync,
625625
110)
626626

627627
DECL_ATTR(completionHandlerAsync, CompletionHandlerAsync,
628-
OnAbstractFunction | ConcurrencyOnly | LongAttribute |
628+
OnAbstractFunction | ConcurrencyOnly | LongAttribute | UserInaccessible |
629629
ABIStableToAdd | ABIStableToRemove |
630630
APIStableToAdd | APIStableToRemove,
631631
111)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %empty-directory(%t)
2+
3+
// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -print-module -print-interface -source-filename %s -module-to-print=ObjCConcurrency -function-definitions=false -enable-experimental-concurrency | %FileCheck %s
4+
5+
// REQUIRES: objc_interop
6+
// REQUIRES: concurrency
7+
import _Concurrency
8+
9+
// CHECK-LABEL: class SlowServer : NSObject, ServiceProvider {
10+
11+
// rdar://76685011: Make sure we don't print @completionHandlerAsync in generated interfaces.
12+
// CHECK-NOT: @completionHandlerAsync
13+
// CHECK: func doSomethingSlow(_ operation: String, completionHandler handler: @escaping (Int) -> Void)
14+
// CHECK: func doSomethingSlow(_ operation: String) async -> Int

0 commit comments

Comments
 (0)