2.0.0-Beta: Illegal use of flexible type deserializer.
Describe the bug
I'm getting the following exception in my project after updating to 2.0.0-Beta and running ./gradlew dokkaGenerate:
Execution failed for task ':coil-core:dokkaGenerateModuleHtml'.
> A failure occurred while executing org.jetbrains.dokka.gradle.workers.DokkaGeneratorWorker
> Illegal use of flexible type deserializer.
Expected behaviour The build to finish successfully.
To Reproduce
Check out this branch and run ./gradlew dokkaGenerate.
Dokka configuration None: I removed the Dokka configuration on that branch to reduce confounding factors.
Installation
- Operating system: macOS
- Build tool: Gradle v8.10.2
- Dokka version: 2.0.0-Beta
Additional context I found a similar report from an older Dokka version, however I don’t use the dynamic JS type in my project (maybe a dependency does?).
You can track the issue KT-71784.
Observation: When I comment out the KDoc of the forEachIndices function in collections.kt, the task :coil-core:dokkaGeneratePublicationHtml succeeds.
- /** @see forEach */
+ ///** @see forEach */
internal inline fun <T> List<T>.forEachIndices(action: (T) -> Unit) {
for (i in indices) {
action(get(i))
}
}