services/xrefs: properly filter `ref/call` edge variants
Reviewers: #core_team, zarko
Subscribers: #core_team
@@ -149,9 +149,9 @@ func IsRefKind(requestedKind xpb.CrossReferencesRequest_ReferenceKind, edgeKind
case xpb.CrossReferencesRequest_NO_REFERENCES:
return false
case xpb.CrossReferencesRequest_CALL_REFERENCES:
- return edgeKind == edges.RefCall
+ return edges.IsVariant(edgeKind, edges.RefCall)
case xpb.CrossReferencesRequest_NON_CALL_REFERENCES:
- return edgeKind != edges.RefCall && edges.IsVariant(edgeKind, edges.Ref)
+ return !edges.IsVariant(edgeKind, edges.RefCall) && edges.IsVariant(edgeKind, edges.Ref)
case xpb.CrossReferencesRequest_ALL_REFERENCES:
return edges.IsVariant(edgeKind, edges.Ref)
default:
