File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,17 @@ SILFunction *SILGenModule::getOrCreateForeignAsyncCompletionHandlerImplFunction(
217217 }
218218 return maybeCompletionHandlerOrigTy.getValue ();
219219 }();
220+
221+ // Bridge the block type, so that if it is formally expressed in terms of
222+ // bridged Swift types, we still lower the parameters to their ultimate
223+ // ObjC types.
224+ completionHandlerOrigTy = Types
225+ .getBridgedFunctionType (AbstractionPattern (origFormalType.getGenericSignatureOrNull (),
226+ completionHandlerOrigTy),
227+ completionHandlerOrigTy,
228+ Bridgeability::Full,
229+ SILFunctionTypeRepresentation::Block);
230+
220231 auto blockParams = completionHandlerOrigTy.getParams ();
221232
222233 // Build up the implementation function type, which matches the
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -disable-availability-checking -verify %s
2+ // REQUIRES: concurrency
3+ // REQUIRES: objc_interop
4+
5+ import Foundation
6+ @objc public protocol TAService {
7+ func removeKey( ) async -> Any
8+ }
9+
10+ class FakeService : TAService {
11+ func removeKey( ) async -> Any {
12+ return " "
13+ }
14+ }
15+
16+ class FakeClassHolder {
17+ var service : TAService = FakeService ( )
18+
19+ func removeKey( _ key: String ) async {
20+ _ = await self . service. removeKey ( )
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments