File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1188,6 +1188,7 @@ class SyncPartialApplicationForwarderEmission
11881188
11891189 if (resultSchema.requiresIndirect () ||
11901190 errorSchema.shouldReturnTypedErrorIndirectly () ||
1191+ outConv.hasIndirectSILResults () ||
11911192 outConv.hasIndirectSILErrorResults ()) {
11921193 auto *typedErrorResultPtr = origParams.claimNext ();
11931194 args.add (typedErrorResultPtr);
@@ -1378,6 +1379,7 @@ class AsyncPartialApplicationForwarderEmission
13781379
13791380 if (resultSchema.requiresIndirect () ||
13801381 errorSchema.shouldReturnTypedErrorIndirectly () ||
1382+ outConv.hasIndirectSILResults () ||
13811383 outConv.hasIndirectSILErrorResults ()) {
13821384 auto *typedErrorResultPtr = origParams.claimNext ();
13831385 args.add (typedErrorResultPtr);
Original file line number Diff line number Diff line change @@ -265,3 +265,23 @@ func conditionallyCallsThrowError(b: Bool) throws(SmallError) -> Int {
265265 return 0
266266 }
267267}
268+
269+ func passthroughFixedErrorCall< T> ( _ body: ( ) throws ( TinyError ) -> T ) throws ( TinyError) -> T {
270+ try body ( )
271+ }
272+
273+ func passthroughFixedErrorAsync< T> ( _ body: ( ) async throws ( TinyError ) -> T ) async throws ( TinyError) -> T {
274+ try await body ( )
275+ }
276+
277+ func callClosureSync< T> ( t: T ) {
278+ _ = try ! passthroughFixedErrorCall { ( ) throws ( TinyError) -> T in
279+ return t
280+ }
281+ }
282+
283+ func callClosureAsync< T> ( t: T ) async {
284+ _ = try ! await passthroughFixedErrorAsync { ( ) async throws ( TinyError) -> T in
285+ return t
286+ }
287+ }
You can’t perform that action at this time.
0 commit comments