diff options
Diffstat (limited to 'plugins/javadoc')
3 files changed, 3 insertions, 3 deletions
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt index 96616794..d9aed18f 100644 --- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt +++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt @@ -95,7 +95,7 @@ class JavadocSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLo modifiers { text(f.modifier[it]?.takeIf { it !in ignoredModifiers }?.name?.plus(" ") ?: "") text(f.modifiers()[it]?.toSignatureString() ?: "") - val usedGenerics = f.generics.filter { f uses it } + val usedGenerics = if (f.isConstructor) f.generics.filter { f uses it } else f.generics list(usedGenerics, prefix = "<", suffix = "> ") { +buildSignature(it) } diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt index 2ae5302d..30a9f764 100644 --- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt +++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/JavadocClasslikeTemplateMapTest.kt @@ -312,7 +312,7 @@ internal class JavadocClasslikeTemplateMapTest : AbstractJavadocTemplateMapTest( val ownMethods = assertIsInstance<List<*>>(methods["own"]).first() val sampleFunction = assertIsInstance<Map<String, Any?>>(ownMethods) - assertEquals("final <D extends <a href=Generic.html>T</a>> <a href=Generic.html#sampleFunction()>D</a> <a href=Generic.html#sampleFunction()>sampleFunction</a>()", sampleFunction.signatureWithModifiers()) + assertEquals("final <D extends <a href=Generic.html#Generic>T</a>> <a href=Generic.html#sampleFunction()>D</a> <a href=Generic.html#sampleFunction()>sampleFunction</a>()", sampleFunction.signatureWithModifiers()) } } diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt index afea5914..cd0a8e8f 100644 --- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt +++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationTest.kt @@ -110,7 +110,7 @@ class JavadocTest : AbstractCoreTest() { .firstChildOfType<JavadocClasslikePageNode> { it.name == "Test" } val testFunctionNode = testClassNode.methods.first { it.name == "test3" } assertEquals( - """<a href=Test.html#test3(A,T)>test3</a>(<a href=Test.html>A</a> a, <a href=Test.html#test3(A,T)>T</a> t)""", + """<a href=Test.html#test3(A,T)>test3</a>(<a href=Test.html#Test>A</a> a, <a href=Test.html#test3(A,T)>T</a> t)""", transformer.htmlForContentNode( testFunctionNode.signature.signatureWithoutModifiers, testClassNode |