File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 2
2
//
3
3
// This source file is part of the Swift.org open source project
4
4
//
5
- // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5
+ // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
6
6
// Licensed under Apache License v2.0 with Runtime Library Exception
7
7
//
8
8
// See https://swift.org/LICENSE.txt for license information
@@ -770,7 +770,7 @@ class ApplyClassifier {
770
770
771
771
auto mapping = shuffle->getElementMapping ();
772
772
for (unsigned destIndex = 0 ; destIndex != mapping.size (); ++destIndex) {
773
- auto srcIndex = shuffle-> getElementMapping () [destIndex];
773
+ auto srcIndex = mapping [destIndex];
774
774
if (srcIndex >= 0 ) {
775
775
origSrcElts[srcIndex] = origParamTupleType->getElement (destIndex);
776
776
} else if (srcIndex == TupleShuffleExpr::DefaultInitialize ||
@@ -785,9 +785,6 @@ class ApplyClassifier {
785
785
origSrcElts[srcIndex] =
786
786
origParamTupleType->getASTContext ().TheRawPointerType ;
787
787
}
788
-
789
- // We're done iterating these elements.
790
- break ;
791
788
} else {
792
789
llvm_unreachable (" bad source-element mapping!" );
793
790
}
Original file line number Diff line number Diff line change @@ -545,3 +545,9 @@ func rethrowsWithCaptureList<R, T>(
545
545
return try operation ( array. count)
546
546
}
547
547
}
548
+
549
+ // rdar://problem/40472018: Crash on rethrows function with variadic parameter and throwing function parameter.
550
+ public func variadic_rethrows( _ values: Int ... , body: ( Int ) throws -> ( ) ) rethrows { }
551
+ public func rdar40472018( ) {
552
+ variadic_rethrows ( 1 , 2 ) { _ in }
553
+ }
You can’t perform that action at this time.
0 commit comments