Inspectopedia Help

Boolean expression can be simplified

Reports boolean expression parts that can be reduced to constants.

The quick-fix simplifies the condition.


fun use(arg: Boolean) { if (false == arg) { } }

After the quick-fix is applied:

fun use(arg: Boolean) { if (!arg) { } }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Kotlin, @snapshot@

Last modified: 13 July 2023