File tree Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -2330,14 +2330,17 @@ void SignatureExpansion::expandAsyncAwaitType() {
2330
2330
if (!nativeError.shouldReturnTypedErrorIndirectly ()) {
2331
2331
auto combined = combineResultAndTypedErrorType (IGM, native, nativeError);
2332
2332
2333
- if (!combined.combinedTy ->isVoidTy ()) {
2334
- if (auto *structTy = dyn_cast<llvm::StructType>(combined.combinedTy )) {
2335
- for (auto *elem : structTy->elements ()) {
2336
- components.push_back (elem);
2337
- }
2338
- } else {
2339
- components.push_back (combined.combinedTy );
2333
+ if (combined.combinedTy ->isVoidTy ()) {
2334
+ addErrorResult ();
2335
+ return ;
2336
+ }
2337
+
2338
+ if (auto *structTy = dyn_cast<llvm::StructType>(combined.combinedTy )) {
2339
+ for (auto *elem : structTy->elements ()) {
2340
+ components.push_back (elem);
2340
2341
}
2342
+ } else {
2343
+ components.push_back (combined.combinedTy );
2341
2344
}
2342
2345
addErrorResult ();
2343
2346
ResultIRType = llvm::StructType::get (IGM.getLLVMContext (), components);
Original file line number Diff line number Diff line change 6
6
7
7
// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-library-evolution
8
8
9
- // RUN: %target-swift-frontend -primary-file %s -emit-ir -O
10
-
11
9
// XFAIL: CPU=arm64e
12
10
// REQUIRES: PTRSIZE=64
13
11
@@ -234,16 +232,3 @@ protocol Proto {
234
232
// This used to crash.
235
233
static func f2( ) throws ( SP) -> Int64
236
234
}
237
-
238
- @inline ( never)
239
- @available ( SwiftStdlib 6 . 0 , * )
240
- public func passthroughAsync< T, E: Error > ( f: ( ) async throws ( E) -> T ) async throws ( E) -> T {
241
- try await f ( )
242
- }
243
-
244
- @available ( SwiftStdlib 6 . 0 , * )
245
- public func reabstractAsyncVoidThrowsNever( ) async {
246
- await passthroughAsync {
247
- ( )
248
- }
249
- }
You can’t perform that action at this time.
0 commit comments