Inspectopedia
 
2024.3

Local variable used and declared in different 'switch' branches

Warning
New
Last modified: 03 December 2024

Reports local variables declared in one branch of a switch statement and used in another branch. Such declarations can be extremely confusing.

Example: