Skip to content

Commit

Permalink
Fix: TypeSpecification reference relation
Browse files Browse the repository at this point in the history
  • Loading branch information
JPaja committed Oct 16, 2021
1 parent eb88013 commit 3f2b44d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ protected override void Analyze(AnalysisContext context, TypeSpecification subje
{
context.ScheduleForAnalysis(subject.DeclaringType);
}

if (subject.Resolve() is { } definition)
{
var specification = context.Workspace.Index.GetOrCreateNode(subject);
var definitionNode = context.Workspace.Index.GetOrCreateNode(definition);
definitionNode.ForwardRelations.Add(DotNetRelations.ReferenceType, specification);
}

}
}
}

0 comments on commit 3f2b44d

Please sign in to comment.