You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here roslyn analyzer suggests me to change IList<T> results into List<T>, but doesn't take into account that Task.WhenAll() returns T[] which is not a List<T>.
Additional context
I reproduced this with clean .NET 8 rc1 which was released yesterday so I believe this issue is recent - please feel free to reproduce and see if it applies.
The text was updated successfully, but these errors were encountered:
Analyzer
Diagnostic ID: CA1859: Use concrete types when possible for improved performance
Analyzer source
SDK: Built-in CA analyzers in .NET 8 SDK or later
Version: SDK 8.0.100-rc1
Describe the bug
False positive of CA1859 where I don't expect one.
Steps To Reproduce
I got false positive with following code:
Rewritten for easier reproduction to the code that compiles:
Expected behavior
No CA1859 in above code.
Actual behavior
Here roslyn analyzer suggests me to change
IList<T> results
intoList<T>
, but doesn't take into account thatTask.WhenAll()
returnsT[]
which is not aList<T>
.Additional context
I reproduced this with clean .NET 8 rc1 which was released yesterday so I believe this issue is recent - please feel free to reproduce and see if it applies.
The text was updated successfully, but these errors were encountered: