Files
swift-mirror/test/SILGen/objc_async_defined_in_swift_any.swift
Joe Groff a59686314b SILGen: Use ObjC types to lower async completion handler arguments.
An `@objc` interface defined from Swift may have a formal type in terms of its
Swift bridged types, but we want to lower the SIL-level completion handler
implementation according to the actual ObjC types that will be passed at runtime.
Fixes rdar://93112430
2022-05-27 18:07:22 -07:00

23 lines
506 B
Swift

// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -disable-availability-checking -verify %s
// REQUIRES: concurrency
// REQUIRES: objc_interop
import Foundation
@objc public protocol TAService {
func removeKey() async -> Any
}
class FakeService : TAService {
func removeKey() async -> Any {
return ""
}
}
class FakeClassHolder {
var service : TAService = FakeService()
func removeKey(_ key: String) async {
_ = await self.service.removeKey()
}
}