fun getResult(value: Any?) {
val result = (value as? Map<*, *>)?.get("result")
....
}
The
get
call is marked as an error due to
Type inference failed. The value of the type parameter K should be mentioned in input types (argument types, receiver type or expected type). Try to specify it
But again it compiles and runs fine
g
Greatstone
06/21/2019, 12:33 AM
I had similar problems. I found the option disable new inference in intelliJ.
r
Ruckus
06/21/2019, 2:48 AM
I know you can, but since this will eventually become the new inference engine, these issues should be fixed