提交 02f41d94 编写于 作者: C Cyrus Najmabadi

Fix code

上级 0116b53e
......@@ -232,14 +232,12 @@ private ImmutableArray<DiagnosticData> GetSpecificDiagnostics(Workspace workspac
}
else
{
using var pool = SharedPools.Default<List<Data>>().GetPooledObject();
AppendMatchingData(source, workspace, projectId, documentId, id, buffer);
Debug.Assert(buffer.Count == 0 || buffer.Count == 1);
if (buffer.Count == 1)
{
var diagnostics = pool.Object[0].Diagnostics;
var diagnostics = buffer[0].Diagnostics;
return includeSuppressedDiagnostics
? diagnostics
: diagnostics.NullToEmpty().WhereAsArray(d => !d.IsSuppressed);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册