Skip to content

Commit

Permalink
Addrange on immutableArray creates a new ImmutableArray
Browse files Browse the repository at this point in the history
The buildonlydiagnostics don't get evaluated because of this.
  • Loading branch information
gero3 authored Aug 2, 2023
1 parent b3dc95e commit e28bf9e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public async Task<FirstFixResult> GetMostSevereFixAsync(
}

var buildOnlyDiagnosticsService = document.Project.Solution.Services.GetRequiredService<IBuildOnlyDiagnosticsService>();
allDiagnostics.AddRange(buildOnlyDiagnosticsService.GetBuildOnlyDiagnostics(document.Id));
allDiagnostics = allDiagnostics.AddRange(buildOnlyDiagnosticsService.GetBuildOnlyDiagnostics(document.Id));

var text = await document.GetValueTextAsync(cancellationToken).ConfigureAwait(false);
var spanToDiagnostics = ConvertToMap(text, allDiagnostics);
Expand Down

0 comments on commit e28bf9e

Please sign in to comment.