Symbol Graphs Contain Invalid Default Implementation Relationships #61285
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
SymbolGraphGen
The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.
Describe the bug
Members that are marked as
throwsand/orasyncare recorded as default implementation targets for protocol requirements without the respective keyword(s).This is caused by the name-based comparison here:
Steps To Reproduce
{ "kind": "defaultImplementationOf", "source": "s:9MyLibrary1EPAAE3fooyyKF", "target": "s:9MyLibrary1EP3fooyyF" }Expected behavior
The detection of default implementation should follow the rules applied by the Swift compiler, i.e. a member can only implement a protocol requirement if it requires a subset of the call modifiers (
try,await) required by the protocol requirement.E.g. in the example above, the implementation cannot implement the requirement because the former
throws, whereas the latter doesn't:Environment (please fill out the following information)
The text was updated successfully, but these errors were encountered: