Inspectopedia Help

Library function call could be simplified

Reports library function calls which could be replaced by simplified one.

Using corresponding functions makes your code simpler.

The quick-fix replaces the function calls with another one.

Example:

fun test(list: List<Any>) { list.filter { it is String } }

After the quick-fix is applied:

fun test(list: List<Any>) { list.filterIsInstance<String>() }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Kotlin, @snapshot@

Last modified: 13 July 2023