Files
swift-mirror/test/IDE/print_objc_concurrency_interface.swift
Ben Barham e7e9b57051 Replace @completionHandlerAsync with @available(*, renamed:)
Instead of a new attribute `@completionHandlerAsync`, allow the use of
the existing `renamed` parameter of `@available` to specify the
asynchronous alternative of a synchronous function.

No errors will be output from invalid names as `@completionHandlerAsync`
had, but if a function is correctly matched then it will be used to
output warnings when using the synchronous function in an asynchronous
context (as before).

Resolves rdar://80612731
2021-07-29 09:14:44 +10:00

15 lines
642 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -print-module -print-interface -source-filename %s -module-to-print=ObjCConcurrency -function-definitions=false | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: concurrency
import _Concurrency
// CHECK-LABEL: class SlowServer : NSObject, ServiceProvider {
// rdar://76685011: Make sure we don't print implicit @available in generated interfaces.
// CHECK-NOT: @available
// CHECK: func doSomethingSlow(_ operation: String, completionHandler handler: @escaping (Int) -> Void)
// CHECK: func doSomethingSlow(_ operation: String) async -> Int