Introduce "Useless call on collection type" inspection
Related to KT-12165 Supported functions: filterNotNull, filterIsInstance, mapNotNull, mapNotNullTo, mapIndexedNotNull, mapIndexedNotNullTo Also, "Useless cal on not-null" improved a bit
This commit is contained in:
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
|
||||
val x = listOf("1").<caret>mapNotNull { if (it.isNotEmpty()) it.toInt() else null }
|
||||
Reference in New Issue
Block a user