Closed peterpilgrim closed 2 years ago
Hello. If I remove import arrow.core.*
, the code executes without an error, so this is not an issue with the coroutine library. Arrow is not an official part of Kotlin, it's a third-party plugin. I suggest asking someone knowledgeable about Arrow about this. Probably someone on the Kotlin Slack channel can answer this. Or maybe simply not using Arrow is also an option in your case.
I removed the arrow.core.* but I still get the error. I also copied the code to another brand new project, which was clean, without the arrows dependencies. I still got the error. I am running OpenJDK 17 temurin, perhaps, this is modules or something?
Please share a full project where this issue reproduces.
Sure. Here goes https://github.com/peterpilgrim/coroutines-kt-learn-temp
Your project uses an old version of the compiler. Only Kotlin > 1.7.0 1.6.0 is supported in coroutines 1.6.0 and above. When I replace
`kotlin-dsl`
in the plugins
block in your build.gradle.kts
with
kotlin("jvm") version "1.7.20"
everything starts to work.
Good heavens!
Thank you very much @dkhalanskyjb for investing your time and effort. Yes it does work.
Sorry, I was a bit mistaken: Kotlin version 1.6.0 is also fine.
Filed an issue about the error message not being helpful: https://youtrack.jetbrains.com/issue/KT-54494/Check-that-the-compiler-complains-about-signatures-with-unknown-metadata
Hello. Greetings.
I am using Kotlin 1.6.4 and playing about with the Arrows Flow https://kotlinlang.org/docs/flow.html#flows
I tried to run this example:
But in both IntelliJ and Gradle CLI I get this
ClassCastException
.I am not sure what is going on?