I encountered an error relating to types when upgr...
# exposed
r
I encountered an error relating to types when upgraded to 2.0.0-RC2
Type argument for a type parameter V can't be inferred because it has incompatible upper bounds: UUID, Comparable<UUID>, EntityID<UUID> (multiple incompatible classes: UUID, EntityID<UUID>)
Posted full question on https://stackoverflow.com/questions/78446094/type-errors-on-kotlin-2-0-upgrade Slack Conversation
a
Do you update exposed to 0.50.0?
r
yes version 0.50.0
a
try kotlin 2.0.0 with exposed 0.49.0
r
making that change
error persist
c
Hi @Rudy Sulley Related type inference warnings were fixed around version 0.47.0 to 0.48.0. But it seems that comparison operators that were showing no warning in 1.9.21 are now showing errors with 2.0.0-RC2. I've created an issue that you can track while we look into it: EXPOSED-377
r
@Chantal Loncle I've downgraded to 1.9.24 while waiting, it's just an app I use to test changes, although it's in production. Won't cost me much if it goes wrong.
c
Hi @Rudy Sulley, I looked into this and when using IntelliJ IDEA the comparison op in your example code is highlighted as an error, but the code actually still compiles and runs successfully. I noticed similar false positive highlights in some of our existing test cases (in spite of the build passing with the bumped Kotlin version) and am now looking into whether this is a known IntelliJ IDEA issue. Could you please confirm if the errors you are getting are also false positives? Meaning that the code compiles and runs successfully in spite of it being highlighted as an error in the IDE editor? And if so, could you confirm which build version of IntelliJ you are using?
r
@Chantal Loncle code does compile and run successfully
c
@Rudy Sulley Are you using K1 IDE mode with the K2 compiler? Doing so may cause false errors during code analysis, so please switch to K2 Kotlin Mode. This resolved the false error highlights for me. In the meantime, I will log an issue regarding the false errors in the the stable K1 IDE mode.
r
I was using K1, yes. Switched to experiment with k2
👍 1