Commit 0d3a4b4
committed
[Concurrency] if let value on async value should be banned (not crash)
The issue is that the shorthand if let syntax injects an implicit
expression: #40694 in ParseStmt and
that the 'diagnoseUnhandledAsyncSite' explicitly avoids reporting errors
in implicit expressions.
This change is that we don't mark the implicit declref code emitted by
the `if let prop` as implicit anymore, and this way the reporting works
out as expected.
Added some tests covering this as well as properly erroring out for the
nonexistent syntax of shortand + awaiting which doesn't exist, and we
properly error on it.
Resolves rdar://1261695641 parent 5e810ea commit 0d3a4b4
File tree
7 files changed
+89
-17
lines changed- lib
- ASTGen/Sources/ASTGen
- Parse
- Sema
- test
- Concurrency
- DebugInfo
- expr/unary
7 files changed
+89
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1793 | 1793 | | |
1794 | 1794 | | |
1795 | 1795 | | |
1796 | | - | |
1797 | | - | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
1798 | 1802 | | |
1799 | 1803 | | |
1800 | 1804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
| 1254 | + | |
1254 | 1255 | | |
1255 | 1256 | | |
1256 | 1257 | | |
| |||
2018 | 2019 | | |
2019 | 2020 | | |
2020 | 2021 | | |
2021 | | - | |
| 2022 | + | |
2022 | 2023 | | |
2023 | 2024 | | |
2024 | 2025 | | |
| |||
2663 | 2664 | | |
2664 | 2665 | | |
2665 | 2666 | | |
2666 | | - | |
2667 | | - | |
| 2667 | + | |
2668 | 2668 | | |
2669 | 2669 | | |
2670 | | - | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
2671 | 2679 | | |
| 2680 | + | |
2672 | 2681 | | |
2673 | 2682 | | |
2674 | 2683 | | |
| |||
2691 | 2700 | | |
2692 | 2701 | | |
2693 | 2702 | | |
| 2703 | + | |
2694 | 2704 | | |
2695 | 2705 | | |
2696 | 2706 | | |
| |||
2723 | 2733 | | |
2724 | 2734 | | |
2725 | 2735 | | |
2726 | | - | |
| 2736 | + | |
2727 | 2737 | | |
2728 | 2738 | | |
2729 | | - | |
| 2739 | + | |
2730 | 2740 | | |
2731 | 2741 | | |
2732 | | - | |
| 2742 | + | |
2733 | 2743 | | |
2734 | 2744 | | |
2735 | 2745 | | |
| |||
3293 | 3303 | | |
3294 | 3304 | | |
3295 | 3305 | | |
3296 | | - | |
| 3306 | + | |
3297 | 3307 | | |
3298 | 3308 | | |
3299 | 3309 | | |
| |||
3305 | 3315 | | |
3306 | 3316 | | |
3307 | 3317 | | |
3308 | | - | |
| 3318 | + | |
3309 | 3319 | | |
3310 | 3320 | | |
3311 | 3321 | | |
| |||
Lines changed: 57 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
0 commit comments