"IDE0305 Use collection expression for fluent" not raised if ToArray()
is assigned to a var
variable
#73638
Labels
untriaged
Issues and PRs which have not yet been triaged by a lead
Analyzer
Diagnostic ID: IDE0305:
Use collection expression for fluent
Analyzer source
NuGet Package: Microsoft.CodeAnalysis.CSharp.CodeStyle
Version: 4.9.2
Describe the bug
Steps To Reproduce
var array = list.ToArray();
line does NOT violate IDE0305.string[] array = list.ToArray();
does violate IDE0305.Expected behavior
Both versions violate IDE0305.
Actual behavior
Only the non-
var
version violates IDE0305.Additional context
Full source available here. The offending code is in the root
Program
.#73639 might be related.
The text was updated successfully, but these errors were encountered: