https://kotlinlang.org logo
#announcements
Title
# announcements
r

Ruckus

06/20/2019, 10:02 PM
And another:
Copy code
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
a

Alexey Belkov [JB]

06/21/2019, 7:49 AM
Can you please report these bugs to http://kotl.in/issue? Thanks!
r

Ruckus

06/21/2019, 3:37 PM
I found an issue that may be related, but I'm not sure: https://youtrack.jetbrains.com/issue/KT-32235
👍 1
7 Views