Inspectopedia Help

Redundant receiver-based 'let' call

Reports redundant receiver-based let calls.

The quick-fix removes the redundant let call.

Example:

fun test(s: String?): Int? = s?.let { it.length }

After the quick-fix is applied:

fun test(s: String?): Int? = s?.length

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Kotlin, @snapshot@

Last modified: 13 July 2023