Back to Intellij Community

SimplifiableCall

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

2025.3-rc-2392 B
Original Source

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>()
  }