Pattern: Duplicate case
value
Issue: -
This is usually a typo or changed value of constant.
Example of correct code:
const int A = 1;
switch (v) {
case A:
case 2:
}
Example of incorrect code:
const int A = 1;
switch (v) {
case 1:
case 2:
case A:
case 2:
}