Skip to content

Commit

Permalink
Add test to reproduce #3857
Browse files Browse the repository at this point in the history
  • Loading branch information
vmishenev committed Oct 14, 2024
1 parent d5515e9 commit 78801d2
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<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
|}
"""
) {
with((this / "inheritors" / "NamedDomainObjectContainerScope" / "getNamer").cast<DFunction>()) {
dri equals DRI("inheritors", "NamedDomainObjectContainerDelegate", org.jetbrains.dokka.links.Callable("getNamer", null, emptyList()) )
}
}
}
}

0 comments on commit 78801d2

Please sign in to comment.