Commit 1284437
committed
[TypeCheckEffects] Diagnose type mismatches for thrown errors in contexts that
throw `Never`.
Previously, this mistake slipped through the effects checker because it used
a fallback type of `any Error` if a catch node had a null thrown error type.
This change also fixes an issue where thrown error type mismatches were not
diagnosed at all in autoclosures.
(cherry picked from commit 775191c)1 parent 7bd3046 commit 1284437
2 files changed
+41
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3010 | 3010 | | |
3011 | 3011 | | |
3012 | 3012 | | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
3013 | 3024 | | |
3014 | 3025 | | |
3015 | 3026 | | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
3016 | 3031 | | |
3017 | 3032 | | |
3018 | 3033 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
0 commit comments