How to safety cast raw Map to Map<String, List<Int>> in Kotlin?
I need a function which will cast Map to Map<String, List<Int>> Currently I use unsafe "as" but I receive a fair warning about it. I want to fix it. For list part I was able to implement function inline fun <reified T : Any> List<*>.checkItemsAre(): List<T> { return this.filterIsInstance<T>().takeIf { it.size == this.size } ?:… Read More How to safety cast raw Map to Map<String, List<Int>> in Kotlin?