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
S2583 is raising when a collection is checked for Any with two distinct conditions
Reproducer
Private Sub Solve(Ns() As Node)
If Ns.Any(Function(X) X.DAC AndAlso X.FFT) Then
'Do something
ElseIf Ns.Any(Function(X) X.DAC OrElse X.FFT) Then 'Noncompliant FP, condition is not the same
'Do something
Else
'AoC
End If
End Sub
Private Class Node
Public DAC, FFT As Boolean
End Class
Activity
github-actions commentedon Apr 1, 2026
Internal ticket NET-3532
[-]Fix S2583 FP: Any called two times[/-][+]NET-3532 Fix S2583 FP: Any called two times[/+]alex-meseldzija-sonarsource commentedon Apr 14, 2026
Hi @PavlinII
this has been fixed in the 10.23 release of our analyzers.