提交 c1d3eaa4 编写于 作者: M Manish Vasani

Address feedback

上级 cfa66fb0
......@@ -448,17 +448,13 @@ private static ImmutableArray<DiagnosticDataLocation> GetAdditionalLocations(Tex
{
if (location.IsInSource)
{
if (CreateLocation(document.Project.GetDocument(location.SourceTree), location) is { } dataLocation)
{
builder.Add(dataLocation);
}
builder.AddIfNotNull(CreateLocation(document.Project.GetDocument(location.SourceTree), location));
}
else if (location.Kind == LocationKind.ExternalFile)
{
if (document.Project.GetDocumentForExternalLocation(location) is { } textDocumentId &&
CreateLocation(document.Project.GetTextDocument(textDocumentId), location) is { } dataLocation)
if (document.Project.GetDocumentForExternalLocation(location) is { } textDocumentId)
{
builder.Add(dataLocation);
builder.AddIfNotNull(CreateLocation(document.Project.GetTextDocument(textDocumentId), location));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册