Inspectopedia Help

Redundant '?: return null'

Reports redundant ?: return null

Example:

fun foo(): Int? { ... } fun test() : Int? { return foo() ?: return null }

After the quick-fix is applied:

fun foo(): Int? { ... } fun test() : Int? { return foo() }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Kotlin, @snapshot@

Last modified: 13 July 2023