Commit 2697773
committed
[Concurrency] Only apply default main actor to local and nested
decls that are in a main actor isolated context.
This prevents `@MainActor` from being inferred in a context where
it cannot be used, while still allowing main actor code to be used
in local contexts that are also main actor isolated.
(cherry picked from commit 858e145)1 parent a1a8d73 commit 2697773
File tree
2 files changed
+62
-14
lines changed- lib/Sema
- test/Concurrency
2 files changed
+62
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6125 | 6125 | | |
6126 | 6126 | | |
6127 | 6127 | | |
6128 | | - | |
6129 | | - | |
6130 | | - | |
| 6128 | + | |
| 6129 | + | |
| 6130 | + | |
| 6131 | + | |
| 6132 | + | |
| 6133 | + | |
| 6134 | + | |
| 6135 | + | |
| 6136 | + | |
| 6137 | + | |
| 6138 | + | |
| 6139 | + | |
| 6140 | + | |
| 6141 | + | |
| 6142 | + | |
| 6143 | + | |
6131 | 6144 | | |
6132 | 6145 | | |
6133 | 6146 | | |
6134 | 6147 | | |
6135 | 6148 | | |
6136 | 6149 | | |
6137 | 6150 | | |
6138 | | - | |
6139 | | - | |
6140 | | - | |
6141 | | - | |
6142 | | - | |
6143 | | - | |
6144 | | - | |
6145 | | - | |
6146 | | - | |
6147 | | - | |
| 6151 | + | |
6148 | 6152 | | |
6149 | | - | |
| 6153 | + | |
| 6154 | + | |
6150 | 6155 | | |
6151 | 6156 | | |
6152 | 6157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
0 commit comments