mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
don't emit both requirementOf and optionalRequirementOf for the same relationship (#76983)
rdar://83519993
This commit is contained in:
@@ -465,7 +465,8 @@ void
|
||||
SymbolGraph::recordRequirementRelationships(Symbol S) {
|
||||
const auto VD = S.getSymbolDecl();
|
||||
if (const auto *Protocol = dyn_cast<ProtocolDecl>(VD->getDeclContext())) {
|
||||
if (VD->isProtocolRequirement()) {
|
||||
if (VD->isProtocolRequirement() &&
|
||||
!VD->getAttrs().hasAttribute<OptionalAttr>()) {
|
||||
recordEdge(Symbol(this, VD, nullptr),
|
||||
Symbol(this, Protocol, nullptr),
|
||||
RelationshipKind::RequirementOf());
|
||||
|
||||
Reference in New Issue
Block a user