Commit 642392c
committed
Computed properties can't be async, don't even try
The fix-it was being a little too eager to label function decls async.
Computed properties, or AccessorDecls are function declarations, but
they don't have parentheses, so trying to add `async` to them causes
crashing. Furthermore, they can't be async at all, so suggesting that we
make them async is just wrong. We shouldn't give folks a glimmer of hope
where there is none to be had.1 parent 29cfd3e commit 642392c
File tree
2 files changed
+14
-3
lines changed- lib/Sema
- test/Concurrency
2 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
148 | 147 | | |
149 | 148 | | |
150 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments