Skip to content

Commit

Permalink
Add Debug.Assert
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinAlpert committed May 18, 2024
1 parent e264af8 commit 6d45c87
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using Analyzer.Utilities;
Expand Down Expand Up @@ -172,6 +173,8 @@ private static bool IsSemaphoreSlimWaitWithZeroArgumentInvocation(IInvocationOpe
return false;
}

Debug.Assert(!invocation.Arguments.IsEmpty);

IOperation argumentValue = invocation.Arguments[0].Value;

return argumentValue.HasConstantValue(0)
Expand Down

0 comments on commit 6d45c87

Please sign in to comment.