is this a compiler bug (1.3.72)? The objects in t...
# announcements
k
is this a compiler bug (1.3.72)? The objects in the map are the right type but it wants the type of the variable to be more defined?
d
Check your imports. Did you import TypeAdapter from the right place?
k
java.lang.Class and com.google.gson.TypeAdapter Right ones AFAIK.
b
Are you using IntelliJ? If so try to uncheck in the preferences: Build, Execution, Deployment ➡️ Compiler ➡️Kotlin Compiler➡️
Enable new type inference algorithm for IDE analysis
If the error then shows up before compiling, you know that the new type inference would fix the problem. There is a flag to enable it for compiling
k
Interesting... This is in Android Studio unfortunately. I'll see if I can load it in IJ..
a
In AS the setting is located in "File | Settings | Kotlin Compiler". In any case, please report an issue to http://kotl.in/issue with a self-contained code example. Thanks!