aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorvmishenev <vad-mishenev@yandex.ru>2021-07-27 14:37:24 +0300
committerGitHub <noreply@github.com>2021-07-27 13:37:24 +0200
commit79cf537a1d0d5864e23af754836e48d13a5d722f (patch)
treee4c3a2cf0cd40dc395a2dbbd7f2e54b12e080370 /plugins
parent17176ede814020dce776b5249e3e3a927c24f1a3 (diff)
downloaddokka-79cf537a1d0d5864e23af754836e48d13a5d722f.tar.gz
dokka-79cf537a1d0d5864e23af754836e48d13a5d722f.tar.bz2
dokka-79cf537a1d0d5864e23af754836e48d13a5d722f.zip
Remove extra `fun` keyword in functional interface signature (#2040)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt8
-rw-r--r--plugins/base/src/test/kotlin/signatures/SignatureTest.kt18
2 files changed, 18 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
index 6446a775..e5f0ae97 100644
--- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
+++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
@@ -131,14 +131,6 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
""
)
}
- if (c is DInterface) {
- c.extra[AdditionalModifiers]?.content?.let { additionalModifiers ->
- sourceSetDependentText(additionalModifiers, setOf(sourceSet)) { extraModifiers ->
- if (ExtraModifiers.KotlinOnlyModifiers.Fun in extraModifiers) "fun "
- else ""
- }
- }
- }
when (c) {
is DClass -> {
processExtraModifiers(c)
diff --git a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
index f9d95f46..5605d867 100644
--- a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
+++ b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
@@ -230,6 +230,24 @@ class SignatureTest : BaseAbstractTest() {
}
@Test
+ fun `functional interface`() {
+ val source = source("fun interface KRunnable")
+ val writerPlugin = TestOutputWriterPlugin()
+
+ testInline(
+ source,
+ configuration,
+ pluginOverrides = listOf(writerPlugin)
+ ) {
+ renderingStage = { _, _ ->
+ writerPlugin.writer.renderedContent("root/example/-k-runnable/index.html").firstSignature().match(
+ "fun interface ", A("KRunnable"), Span()
+ )
+ }
+ }
+ }
+
+ @Test
fun `fun with annotation`() {
val source = """
|/src/main/kotlin/test/Test.kt