Commit 0c42c01
committed
Show protocol requirements satisfied in extensions in jump-to-definition
The key issue here was that we were looking at the symbol occurrence that had the `overrideOf` role and were using this symbol occurrence to also check that it’s a child of one of the receiver types. But if the protocol requirement is satisfied in an extension, we have an implicit symbol occurrence at the location where the protocol requirement is stated but the real declaration’s occurrence is inside the extension. The fix here is to just extract the USR from the `overrideOf` relation and then do another index lookup to find the symbol’s definition.
rdar://1294124281 parent 518aac4 commit 0c42c01
File tree
2 files changed
+33
-6
lines changed- Sources/SourceKitLSP
- Tests/SourceKitLSPTests
2 files changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1717 | 1717 | | |
1718 | 1718 | | |
1719 | 1719 | | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
1723 | 1726 | | |
1724 | 1727 | | |
1725 | 1728 | | |
| |||
2473 | 2476 | | |
2474 | 2477 | | |
2475 | 2478 | | |
2476 | | - | |
| 2479 | + | |
2477 | 2480 | | |
2478 | 2481 | | |
2479 | 2482 | | |
2480 | 2483 | | |
2481 | | - | |
2482 | | - | |
| 2484 | + | |
| 2485 | + | |
2483 | 2486 | | |
2484 | 2487 | | |
2485 | 2488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
604 | 628 | | |
0 commit comments