Has anyone else seen incorrect linting of Kotlin f...
# android
j
Has anyone else seen incorrect linting of Kotlin files in Android Studio related to certain collection classes? I'm having trouble with HashMap and ArrayList for example. Compilation yields no errors, only IDE parsing within the editor. I'm using v1.2.30.
g
incorrect parsing? What do you mean?
j
I'm using a Kotlin multiplatform project and I'm experiencing inconsequential parsing/type checking errors in the editor. The Gradle build completes with no errors and the Android app executes perfectly well, however the editor persistently shows what it believes as fatal errors (red underlined text). Also certain basic Kotlin collection types aren't resolved and I see type checking failures in the editor window.
I think there's some sort of ambiguity with JVM types (HashMap, ArrayList), although I'm not importing any of these Java types into my common project.
o
@mglukhikh please take a look, sounds similar to what we have with
arrayListOf
ambiguity we’ve seen recently
j
Yes, this sounds likely to be similar. I'm seeing that error for
arrayListOf
"overload resolution ambuiguity", and a reference to unresolved 'java.util.ArrayList' in one file and unresolved references to Kotlin collections ArrayList and HashMap in other files.
There's also another error for unresolved StringBuilder.
So this bug report does describe some of what I'm seeing, but there are other errors beyond
arrayListOf
https://youtrack.jetbrains.com/issue/KT-20406
m
Yes, looks like it's the same thing