IntelliJ is giving me this warning. And I don't fu...
# announcements
j
IntelliJ is giving me this warning. And I don't fully understand how to fix this. Could someone explain what I'm doing wrong by calling
.get
here?
Found it! Was because of me providing the wrong argument. This warning just confused me 😲 This was a real error made by me, I would not expect it to only show as a warning but rather be shown as an error.
i
This raises a compilation error in Kotlin 1.3.7x. On the contrary, IDE shows this as a warning -- that's because it uses another new experimental type inference algorithm. That algorithm will have been fixed to treat this situation as an error by the time it becomes the default type inference used by the compiler.
👍 2
n
can you enlighten me what the actual error was?
j
in it's most basic form it was this. Here I've added 2 screenshots, one with the new type inference algorithm and one without.
the KEY type in this map isn't of the type Int which is why it's an error.
n
I got that. What I missed was that the map key was
CriteriaGroupCriteria
but the
get
parameter was of type
CriteriaGroupConnection
. Too long words for me to parse...