dokka
dokka copied to clipboard
[K2] Dokka generates a redundant page
Dokka generates a redundant page in the case of an untrivial hierarchy when there is an intersected and overridden fake function/property.
From Gradle DSL`s codebase:
class NamedDomainObjectContainerScope<T : Any>
: NamedDomainObjectContainerDelegate<T>(), PolymorphicDomainObjectContainer<T>
abstract class NamedDomainObjectContainerDelegate<T : Any> : NamedDomainObjectContainer<T> {
override fun getNamer(): T? = null
}
interface PolymorphicDomainObjectContainer<T> : NamedDomainObjectContainer<T>
interface NamedDomainObjectContainer<T> {
fun getNamer(): T? = null
}
K1:
The signature of the function NamedDomainObjectContainerScope.getNamer leads to NamedDomainObjectContainerDelegate.getNamer.
It has the DRI NamedDomainObjectContainerDelegate.getNamer.
K2:
The signature of the function NamedDomainObjectContainerScope.getNamer leads to a dedicated page NamedDomainObjectContainerScope.getNamer
It has the DRI NamedDomainObjectContainerScope.getNamer.
It is blocked by https://youtrack.jetbrains.com/issue/KT-72244/Analysis-API-Fake-override-symbol-has-no-overridden-symbols
It seems like the cause of the bug was on the FIR side, and it is already fixed in the current versions of Kotlin/AA.
@vmishenev The test you added works after rebasing, and the web page rendering behaves as expected. Are you OK with me updating it and opening a PR?
Great! I’m totally fine.
Issue is already fixed in AA, new tests added in #4307