Commit b7b6a1d
committed
Ensure that macro-provided operators can be found by witness lookup
When looking for an operator to satisfy a protocol requirement, we
currently depend on global operator lookup for everything except local
types. However, macro-provided operators aren't found by global
operator lookup, so perform a member lookup for such cases in addition
to global operator lookup. This makes macro-provided operators visible
through protocol requirements they witness.1 parent 343947a commit b7b6a1d
File tree
2 files changed
+58
-7
lines changed- lib/Sema
- test/Macros
2 files changed
+58
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
1318 | 1320 | | |
1319 | 1321 | | |
1320 | 1322 | | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1321 | 1342 | | |
1322 | 1343 | | |
1323 | 1344 | | |
| |||
1335 | 1356 | | |
1336 | 1357 | | |
1337 | 1358 | | |
1338 | | - | |
| 1359 | + | |
| 1360 | + | |
1339 | 1361 | | |
1340 | 1362 | | |
1341 | | - | |
| 1363 | + | |
| 1364 | + | |
1342 | 1365 | | |
1343 | 1366 | | |
1344 | 1367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
468 | 488 | | |
469 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
470 | 492 | | |
471 | 493 | | |
472 | 494 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
477 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
478 | 506 | | |
0 commit comments