https://kotlinlang.org logo
Title
u

user

07/07/2022, 8:31 AM
Kotlin: Type inference failed. The value of the type parameter T should be mentioned in input types I'm new to Kotlin, for the piece of the below code: fun a(stcd: String) { val res = mutableSetOf() val aaa = mutableListOf() aaa.stream().filter { x: Map -> x.isNotEmpty() } .filter { x: Map -> x.values.contains(stcd) // throws error }.forEach { x: Map -> x.forEach { (k: String, v: Set?) -> res.add(k) } } } Could anyone point out why contains throws error:Type...