Skip to content

Commit

Permalink
Fixed: do not allocate collection (regression from #156)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkoelman committed Apr 22, 2024
1 parent d0713c7 commit 0c3e9cd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;

Expand All @@ -22,7 +23,7 @@ public ICollection<Diagnostic> Diagnostics
{
if (diagnostics == null)
{
return [];
return ImmutableArray<Diagnostic>.Empty;
}

return diagnostics;
Expand Down

0 comments on commit 0c3e9cd

Please sign in to comment.