File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
validation-test/Sema/type_checker_crashers_fixed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -8802,7 +8802,7 @@ ExprWalker::rewriteTarget(SolutionApplicationTarget target) {
88028802 return convertType &&
88038803 !convertType->hasPlaceholder () &&
88048804 !target.isOptionalSomePatternInit () &&
8805- !(solution.getType (resultExpr)->isUninhabited () &&
8805+ !(solution.getResolvedType (resultExpr)->isUninhabited () &&
88068806 cs.getContextualTypePurpose (target.getAsExpr ())
88078807 == CTP_ReturnSingleExpr);
88088808 };
Original file line number Diff line number Diff line change 1+ // RUN: %target-typecheck-verify-swift
2+
3+ struct S {
4+ func crash( ) -> Never {
5+ fatalError ( " " )
6+ }
7+ }
8+
9+ class A {
10+ func value( ) -> Int { 42 }
11+ }
12+
13+ class B : A {
14+ let value : S = S ( )
15+
16+ func test( ) throws -> B {
17+ value. crash ( ) // Ok
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments