Files
kotlin-fork/idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapIndexedNotNullTo.kt
T
Mikhail Glukhikh bdb9f00c75 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
2017-06-29 16:25:50 +03:00

3 lines
150 B
Kotlin
Vendored

// WITH_RUNTIME
val someList = listOf("alpha", "beta").<caret>mapIndexedNotNullTo(destination = hashSetOf()) { index, value -> index + value.length }