Back to Intellij Community

SimpleRedundantLet

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

2025.3-rc-2248 B
Original Source

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