Inspectopedia
 
2024.3

Assignment used as condition

Warning
Reliability
New
Last modified: 03 December 2024

Reports an assignment that is used as the condition of an if, while, for, or do statement. Although occasionally intended, this usage is confusing, and often indicates a typo (for example, = instead of ==).