Hi all. Got a strange error related to typealias &...
# announcements
d
Hi all. Got a strange error related to typealias && extension functions:
Copy code
data class Custom(val i: Int)

typealias MyData = Map<Custom, List<Int>>

fun MyData.isEmpty(key: Custom) = this.get(key)?.isEmpty()
get
invocation is hightlighted and the error is: "Type inference failed. The value of type paramter K should be mentioned in input types. Try to specify it explicitly" Any hint of how to do that and why is it needed? If I replace
Custom
with
String
there, no error is produced.