Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.kt
T
2023-09-20 09:31:29 +00:00

19 lines
415 B
Kotlin
Vendored

interface Diagnostic {
val name: String
}
fun foo(conflicting: List<Diagnostic>) {
val filtered = arrayListOf<Diagnostic>()
conflicting.groupBy {
it.name
}.forEach {
val diagnostics = it.value
filtered.addAll(
diagnostics.filter { me ->
diagnostics.none { other ->
me != other
}
}
)
}
}