Files
swift-mirror/test/ClangImporter/objc_async_attrs_noconcurrency.swift
Doug Gregor 8c123e8505 [Concurrency] Hard-code support for importing @MainActor.
Our name lookup rules for the resolution of custom attributes don't
allow for them to find MainActor within the _Concurrency library.
Therefore, hardcode @MainActor to map to _Concurrency.MainActor.

While here, make sure we drop concurrency-specific attributes that
show up in Clang attributes when we aren't in concurrency mode.
2021-01-08 17:03:50 -08:00

25 lines
745 B
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules %s -verify
// REQUIRES: objc_interop
import Foundation
import ObjCConcurrency
func testSlowServerSynchronous(slowServer: SlowServer) {
// synchronous version
let _: Int = slowServer.doSomethingConflicted("thinking")
slowServer.poorlyNamed("hello") { (i: Int) in print(i) }
slowServer.customize(with: "hello") { (i: Int) in print(i) }
slowServer.dance("jig") { s in print(s + "") }
slowServer.leap(17) { s in print(s + "") }
slowServer.repeatTrick("jump") { i in print(i + 1) }
}
func testSlowServerOldSchool(slowServer: SlowServer) {
slowServer.doSomethingSlow("mail") { i in
_ = i
}
_ = slowServer.allOperations
}