Commit 6fb5c30
committed
[CSDiagnostics] Contextual failure could result in optional chain having non-optional type
Fixes a crash during diagnostics by not assuming that optional chain
would always produce an optional type, which is not true because in
error scenarios it could get assigned an invalid type from context.
Resolves: rdar://855163901 parent b6047e2 commit 6fb5c30
File tree
2 files changed
+21
-1
lines changed- lib/Sema
- validation-test/Sema/type_checker_crashers_fixed
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2351 | 2351 | | |
2352 | 2352 | | |
2353 | 2353 | | |
2354 | | - | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
2355 | 2357 | | |
2356 | 2358 | | |
2357 | 2359 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments