diff --git a/dokka-subprojects/plugin-base/src/test/kotlin/model/InheritorsTest.kt b/dokka-subprojects/plugin-base/src/test/kotlin/model/InheritorsTest.kt index 59f7c15c37..58661dd85c 100644 --- a/dokka-subprojects/plugin-base/src/test/kotlin/model/InheritorsTest.kt +++ b/dokka-subprojects/plugin-base/src/test/kotlin/model/InheritorsTest.kt @@ -14,6 +14,7 @@ import org.jetbrains.dokka.model.doc.Description import org.jetbrains.dokka.model.doc.P import org.jetbrains.dokka.model.doc.Text import utils.AbstractModelTest +import utils.OnlyDescriptors import utils.assertNotNull import utils.comments import kotlin.test.Test @@ -711,4 +712,29 @@ class InheritorsTest : AbstractModelTest("/src/main/kotlin/inheritors/Test.kt", } } } + + @Test + @OnlyDescriptors("#3857") + fun `fake intersected and overridden fake fun should have correct DRI`() { + inlineModelTest( + """ + |class NamedDomainObjectContainerScope + | : NamedDomainObjectContainerDelegate(), PolymorphicDomainObjectContainer + | + |abstract class NamedDomainObjectContainerDelegate : NamedDomainObjectContainer { + | override fun getNamer(): T? = null + |} + | + |interface PolymorphicDomainObjectContainer: NamedDomainObjectContainer + | + |interface NamedDomainObjectContainer { + | fun getNamer(): T? = null + |} + """ + ) { + with((this / "inheritors" / "NamedDomainObjectContainerScope" / "getNamer").cast()) { + dri equals DRI("inheritors", "NamedDomainObjectContainerDelegate", org.jetbrains.dokka.links.Callable("getNamer", null, emptyList()) ) + } + } + } }