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
1188
1188
1189
1189
if (resultSchema.requiresIndirect () ||
1190
1190
errorSchema.shouldReturnTypedErrorIndirectly () ||
1191
+ outConv.hasIndirectSILResults () ||
1191
1192
outConv.hasIndirectSILErrorResults ()) {
1192
1193
auto *typedErrorResultPtr = origParams.claimNext ();
1193
1194
args.add (typedErrorResultPtr);
@@ -1378,6 +1379,7 @@ class AsyncPartialApplicationForwarderEmission
1378
1379
1379
1380
if (resultSchema.requiresIndirect () ||
1380
1381
errorSchema.shouldReturnTypedErrorIndirectly () ||
1382
+ outConv.hasIndirectSILResults () ||
1381
1383
outConv.hasIndirectSILErrorResults ()) {
1382
1384
auto *typedErrorResultPtr = origParams.claimNext ();
1383
1385
args.add (typedErrorResultPtr);
Original file line number Diff line number Diff line change @@ -265,3 +265,23 @@ func conditionallyCallsThrowError(b: Bool) throws(SmallError) -> Int {
265
265
return 0
266
266
}
267
267
}
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