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.
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 theoverrideOf
relation and then do another index lookup to find the symbol’s definition.rdar://129412428