[FIR] Fix reporting of UNINITIALIZED_ENUM_ENTRY in init blocks
^KT-41126 Fixed
This commit is contained in:
committed by
Space Team
parent
c596c1ad73
commit
a9248569a6
@@ -292,6 +292,16 @@ inline fun <T, U, K, V> List<T>.flatGroupBy(
|
||||
return result
|
||||
}
|
||||
|
||||
inline fun <T, K> List<T>.flatAssociateBy(selector: (T) -> Collection<K>): Map<K, T> {
|
||||
return buildMap {
|
||||
for (value in this@flatAssociateBy) {
|
||||
for (key in selector(value)) {
|
||||
put(key, value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <E> MutableList<E>.popLast(): E = removeAt(lastIndex)
|
||||
|
||||
fun <K : Enum<K>, V> enumMapOf(vararg pairs: Pair<K, V>): EnumMap<K, V> = EnumMap(mapOf(*pairs))
|
||||
|
||||
Reference in New Issue
Block a user