Commit 359bd4d
committed
Sema: Fix concurrency adjustment for member operator references
There was a typo in the code which made us ignore the result of
the adjusted operator reference.
This was a regression from commit 1efc9a6.
It doesn't actually matter if an immediately-applied function
reference is `@Sendable` or not... But, there is another hack in
CSApply which devirtualizes a call to a member operator in a
protocol, and the `@Sendable` mismatch made us *skip* this hack.
Skipping the devirtualization hack, in turn, allowed code that
calls `==` on two Foundation.Data instances to type check with
MemberImportVisibility off. Once again, this is probably a
mistake, but it caused a regression where existing code stopped
working.
Ideally, we should teach MemberImportVisibility about conformances,
remove the devirtualization hack, and also skip the `@Sendable`
adjustment except when the member reference is unapplied.
But the existing logic was clearly wrong, so let's fix it.
Fixes rdar://162130647.1 parent f2615c1 commit 359bd4d
File tree
2 files changed
+19
-14
lines changed- lib/Sema
- test/Concurrency
2 files changed
+19
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| |||
1235 | 1233 | | |
1236 | 1234 | | |
1237 | 1235 | | |
1238 | | - | |
1239 | | - | |
1240 | 1236 | | |
1241 | 1237 | | |
1242 | 1238 | | |
1243 | 1239 | | |
1244 | 1240 | | |
1245 | 1241 | | |
1246 | | - | |
| 1242 | + | |
1247 | 1243 | | |
1248 | 1244 | | |
1249 | 1245 | | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1253 | 1250 | | |
1254 | 1251 | | |
1255 | 1252 | | |
1256 | 1253 | | |
1257 | 1254 | | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
1261 | 1258 | | |
1262 | 1259 | | |
1263 | | - | |
| 1260 | + | |
1264 | 1261 | | |
1265 | 1262 | | |
1266 | 1263 | | |
1267 | 1264 | | |
1268 | 1265 | | |
1269 | | - | |
| 1266 | + | |
1270 | 1267 | | |
1271 | 1268 | | |
1272 | 1269 | | |
| |||
1275 | 1272 | | |
1276 | 1273 | | |
1277 | 1274 | | |
1278 | | - | |
| 1275 | + | |
| 1276 | + | |
1279 | 1277 | | |
1280 | 1278 | | |
1281 | 1279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments