diff options
-rw-r--r-- | src/Kotlin/DocumentationBuilder.kt | 6 | ||||
-rw-r--r-- | src/Kotlin/KotlinLanguageService.kt | 2 | ||||
-rw-r--r-- | test/data/format/reifiedTypeParameter.kt | 3 | ||||
-rw-r--r-- | test/data/format/reifiedTypeParameter.md | 8 | ||||
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 6 |
5 files changed, 23 insertions, 2 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index 2ac5e1ec..4b148c39 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -629,10 +629,14 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, if (prefix != "") { node.appendTextNode(prefix, Kind.Modifier) } + if (isReified) { + node.appendTextNode("reified", Kind.Modifier) + } for (constraint in upperBounds) { - if (KotlinBuiltIns.isDefaultBound(constraint)) + if (KotlinBuiltIns.isDefaultBound(constraint)) { continue + } node.appendType(constraint, Kind.UpperBound) } diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt index c08a6cbb..9b6386f8 100644 --- a/src/Kotlin/KotlinLanguageService.kt +++ b/src/Kotlin/KotlinLanguageService.kt @@ -6,7 +6,7 @@ import org.jetbrains.dokka.LanguageService.RenderMode * Implements [LanguageService] and provides rendering of symbols in Kotlin language */ class KotlinLanguageService : LanguageService { - private val fullOnlyModifiers = setOf("public", "protected", "private", "inline", "noinline", "crossinline") + private val fullOnlyModifiers = setOf("public", "protected", "private", "inline", "noinline", "crossinline", "reifiedß") override fun render(node: DocumentationNode, renderMode: RenderMode): ContentNode { return content { diff --git a/test/data/format/reifiedTypeParameter.kt b/test/data/format/reifiedTypeParameter.kt new file mode 100644 index 00000000..00fa1dc9 --- /dev/null +++ b/test/data/format/reifiedTypeParameter.kt @@ -0,0 +1,3 @@ +inline fun f<reified T>() { + +} diff --git a/test/data/format/reifiedTypeParameter.md b/test/data/format/reifiedTypeParameter.md new file mode 100644 index 00000000..2e96018e --- /dev/null +++ b/test/data/format/reifiedTypeParameter.md @@ -0,0 +1,8 @@ +[test](test/index) / [f](test/f) + + +# f + +`inline fun <reified T> f(): Unit` + + diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index c5874b9f..9dc10393 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -191,4 +191,10 @@ public class MarkdownFormatTest { markdownService.appendNodes(tempLocation, output, model.members) } } + + @Test fun reifiedTypeParameter() { + verifyOutput("test/data/format/reifiedTypeParameter.kt", ".md") { model, output -> + markdownService.appendNodes(tempLocation, output, model.members.single().members) + } + } } |