Files
kotlin-fork/compiler/testData/resolvedCalls/enhancedSignatures/list/listReplaceAll.txt
T
Mikhail Zarechenskiy c2fc633ad6 [NI-MIGRATE] Update test about signature enhancements
It's required as now there are no synthetic candidates
2020-02-13 11:15:59 +03:00

14 lines
670 B
Plaintext
Vendored

fun notNullValues(list: MutableList<String>) {
list.replaceAll { it.length.toString() }
// SUCCESS
// ORIGINAL: fun replaceAll(UnaryOperator<E>): Unit defined in kotlin.collections.MutableList
// SUBSTITUTED: fun replaceAll(UnaryOperator<String>): Unit defined in kotlin.collections.MutableList
}
fun nullableValues(list: MutableList<String?>) {
list.replaceAll { it?.run { length.toString() } }
// SUCCESS
// ORIGINAL: fun replaceAll(UnaryOperator<E>): Unit defined in kotlin.collections.MutableList
// SUBSTITUTED: fun replaceAll(UnaryOperator<String?>): Unit defined in kotlin.collections.MutableList
}