diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt | 1 | ||||
-rw-r--r-- | core/src/test/kotlin/javadoc/JavadocTest.kt | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt index 39ad79a6..d2748ee3 100644 --- a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt +++ b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt @@ -15,6 +15,7 @@ fun getSignature(element: PsiElement?) = when(element) { private fun PsiType.typeSignature(): String = when(this) { is PsiArrayType -> "Array((${componentType.typeSignature()}))" + is PsiPrimitiveType -> "kotlin." + canonicalText.capitalize() else -> mapTypeName(this) } diff --git a/core/src/test/kotlin/javadoc/JavadocTest.kt b/core/src/test/kotlin/javadoc/JavadocTest.kt index 614a786e..48bc9f6a 100644 --- a/core/src/test/kotlin/javadoc/JavadocTest.kt +++ b/core/src/test/kotlin/javadoc/JavadocTest.kt @@ -76,6 +76,17 @@ class JavadocTest { } } + @Test fun testLinkWithParam() { + verifyJavadoc("testdata/javadoc/paramlink.kt", withKotlinRuntime = true) { doc -> + val classDoc = doc.classNamed("demo.Apple")!! + assertNotNull(classDoc.asClassDoc()) + val tags = classDoc.inlineTags().filterIsInstance<SeeTagAdapter>() + assertEquals(2, tags.size) + val linkTag = tags[1] as SeeMethodTagAdapter + assertEquals("cutIntoPieces", linkTag.method.name()) + } + } + private fun verifyJavadoc(name: String, withJdk: Boolean = false, withKotlinRuntime: Boolean = false, |