diff options
-rw-r--r-- | src/Kotlin/KotlinLanguageService.kt | 1 | ||||
-rw-r--r-- | test/data/format/annotatedTypeParameter.kt | 2 | ||||
-rw-r--r-- | test/data/format/annotatedTypeParameter.md | 8 | ||||
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 6 |
4 files changed, 17 insertions, 0 deletions
diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt index 9b6386f8..cc38d6d9 100644 --- a/src/Kotlin/KotlinLanguageService.kt +++ b/src/Kotlin/KotlinLanguageService.kt @@ -167,6 +167,7 @@ class KotlinLanguageService : LanguageService { renderType(typeArguments.last()) return } + renderAnnotationsForNode(node) renderSingleModifier(node) renderLinked(node) { identifier(it.name, IdentifierKind.TypeName) } if (typeArguments.any()) { diff --git a/test/data/format/annotatedTypeParameter.kt b/test/data/format/annotatedTypeParameter.kt new file mode 100644 index 00000000..cc3bfc1a --- /dev/null +++ b/test/data/format/annotatedTypeParameter.kt @@ -0,0 +1,2 @@ +public fun <E> containsAll(elements: Collection<@UnsafeVariance E>): @UnsafeVariance E { +} diff --git a/test/data/format/annotatedTypeParameter.md b/test/data/format/annotatedTypeParameter.md new file mode 100644 index 00000000..7d26a162 --- /dev/null +++ b/test/data/format/annotatedTypeParameter.md @@ -0,0 +1,8 @@ +[test](test/index) / [containsAll](test/contains-all) + + +# containsAll + +`fun <E> containsAll(elements: Collection<@UnsafeVariance E>): @UnsafeVariance E` + + diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index 9dc10393..ab905c18 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -197,4 +197,10 @@ public class MarkdownFormatTest { markdownService.appendNodes(tempLocation, output, model.members.single().members) } } + + @Test fun annotatedTypeParameter() { + verifyOutput("test/data/format/annotatedTypeParameter.kt", ".md", withKotlinRuntime = true) { model, output -> + markdownService.appendNodes(tempLocation, output, model.members.single().members) + } + } } |