Back to Intellij Community

ControlFlowWithEmptyBody

plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/ControlFlowWithEmptyBody.html

2025.3-rc-2232 B
Original Source

Reports if, while, do or for statements with empty bodies.

While occasionally intended, this construction is confusing and often the result of a typo.

The quick-fix removes a statement.

Example:

if (a > b) {}