Inspectopedia Help

Unreachable statement

Reports statements that are unreachable. This can occur if the statement is after an infinite loop, return, break, or continue statement.


void foo (int n) { if (n < 1) { return print('This statement is unreachable') } while (true){ print ('Hello, world!') } print('This statement is unreachable too') }

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Groovy, 241.16690

Last modified: 29 April 2024