Ternary expression with identical branches

Last modified: 03 December 2024

Reports ternary expressions with identical "then" and "else" branches. Such expressions are almost certainly a programmer error.

The quick-fix replaces the expression with its "then" branch.

Example:

After the quick-fix is applied: