5b4409e34c
#KT-58542 Fixed
19 lines
415 B
Kotlin
Vendored
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
|
|
}
|
|
}
|
|
)
|
|
}
|
|
} |