Inspectopedia
 
2024.3

Duplicate branches in 'switch'

Info
New
Last modified: 03 December 2024

Reports switch statements or expressions that contain the same code in different branches and suggests merging the duplicate branches.

Example:

After the quick-fix is applied:

New in 2019.1