File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
validation-test/compiler_crashers_fixed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -6703,9 +6703,11 @@ diagnoseAmbiguousMultiStatementClosure(ClosureExpr *closure) {
6703
6703
llvm::SaveAndRestore<DeclContext*> SavedDC (CS->DC , closure);
6704
6704
6705
6705
// Otherwise, we're ok to type check the subexpr.
6706
- auto returnedExpr =
6707
- typeCheckChildIndependently (RS->getResult (),
6708
- TCC_AllowUnresolvedTypeVariables);
6706
+ Expr *returnedExpr = nullptr ;
6707
+ if (RS->hasResult ())
6708
+ returnedExpr =
6709
+ typeCheckChildIndependently (RS->getResult (),
6710
+ TCC_AllowUnresolvedTypeVariables);
6709
6711
6710
6712
// If we found a type, presuppose it was the intended result and insert a
6711
6713
// fixit hint.
Original file line number Diff line number Diff line change 5
5
// See http://swift.org/LICENSE.txt for license information
6
6
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
7
7
8
- // RUN: not --crash %target-swift-frontend %s -parse
8
+ // RUN: not %target-swift-frontend %s -parse
9
9
// REQUIRES: asserts
10
10
. h= { return
11
11
class c
You can’t perform that action at this time.
0 commit comments