Code Inspection: Heuristically unreachable switch arm due to integer analysis
This inspection reports arms of
switch expressions that will never be executed according to the results of integer value analysis. The inspection only works if Analyze integer arithmetic is enabled on the page of ReSharper options ( Alt+R, O ).
Here is an example of annotating the method parameter with [NonNegativeValueAttribute] to refine the analysis within the method body. Knowing that the parameter is non-negative, ReSharper can report redundant cases: