https://kotlinlang.org logo
Title
h

Hullaballoonatic

06/12/2018, 7:43 PM
i don't honestly understand what it means by
completing type inference
since I've tried importing precisely either of those functions, as well as being as specific with class types as possible, nothing changes, and it shouldn't matter anyways? Maybe I should just reinstall.
s

Shawn

06/12/2018, 7:45 PM
usually you see that error when the compiler can’t deduce what the resulting type should be
h

Hullaballoonatic

06/12/2018, 7:46 PM
that's weird, because I designated it specifically
s

Shawn

06/12/2018, 7:46 PM
but that doesn’t seem to be the real issue
h

Hullaballoonatic

06/12/2018, 7:46 PM
val a: ArrayList<Int> = arrayListOf(2)
gives me the same error
s

Shawn

06/12/2018, 7:47 PM
right, I don’t expect it to work in any case since the generic type isn’t the root cause
h

Hullaballoonatic

06/12/2018, 7:47 PM
is it having a hard time figuring if it wants to use the kotlin or java implementation? doesn't kotlin just use the java one?
has no problem with this:
val a: ArrayList<Int> = listOf(2) as ArrayList<Int>
which is basically what i've been doing to get around the issue
o

orangy

06/12/2018, 7:48 PM
Are you on a latest version?
s

Shawn

06/12/2018, 7:49 PM
it may be worth reinstalling the kotlin plugin at the least
h

Hullaballoonatic

06/12/2018, 7:50 PM
Yeah, I'm on 1.2.41
I'll fiddle some more. Thanks for the ideas.
Every bug is an opportunity to learn something that will make the next bug easier to tackle