diff --git a/compiler/testData/diagnostics/tests/funInterface/basicFunInterface.txt b/compiler/testData/diagnostics/tests/funInterface/basicFunInterface.txt index fb435025835..fb451d3fc1a 100644 --- a/compiler/testData/diagnostics/tests/funInterface/basicFunInterface.txt +++ b/compiler/testData/diagnostics/tests/funInterface/basicFunInterface.txt @@ -1,6 +1,6 @@ package -public interface Foo { +public fun interface Foo { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract fun invoke(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceConversion.txt b/compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceConversion.txt index 54f2013b6c4..d38d03069da 100644 --- a/compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceConversion.txt +++ b/compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceConversion.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ f: Foo): kotlin.Unit public fun test(): kotlin.Unit -public interface Foo { +public fun interface Foo { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract fun invoke(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceDisabled.txt b/compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceDisabled.txt index fb435025835..fb451d3fc1a 100644 --- a/compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceDisabled.txt +++ b/compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceDisabled.txt @@ -1,6 +1,6 @@ package -public interface Foo { +public fun interface Foo { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract fun invoke(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/funInterface/funInterfaceSyntheticConstructors.txt b/compiler/testData/diagnostics/tests/funInterface/funInterfaceSyntheticConstructors.txt index 6f55a69343d..1926f4c074f 100644 --- a/compiler/testData/diagnostics/tests/funInterface/funInterfaceSyntheticConstructors.txt +++ b/compiler/testData/diagnostics/tests/funInterface/funInterfaceSyntheticConstructors.txt @@ -3,7 +3,7 @@ package public fun foo(/*0*/ f: KRunnable): kotlin.Unit public fun test(): kotlin.Unit -public interface KRunnable { +public fun interface KRunnable { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract fun invoke(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/funInterface/genericSubstitutionForFunInterface.txt b/compiler/testData/diagnostics/tests/funInterface/genericSubstitutionForFunInterface.txt index 7e20b13b3cf..026c67a3d5a 100644 --- a/compiler/testData/diagnostics/tests/funInterface/genericSubstitutionForFunInterface.txt +++ b/compiler/testData/diagnostics/tests/funInterface/genericSubstitutionForFunInterface.txt @@ -2,7 +2,7 @@ package public fun test(/*0*/ k: K, /*1*/ f_string: F, /*2*/ f_int: F, /*3*/ f_pr: F>): kotlin.Unit -public interface F { +public fun interface F { public abstract fun apply(/*0*/ s: S): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/funInterface/severalConversionsForFunInterface.txt b/compiler/testData/diagnostics/tests/funInterface/severalConversionsForFunInterface.txt index 5bd556848f2..c767c1251b1 100644 --- a/compiler/testData/diagnostics/tests/funInterface/severalConversionsForFunInterface.txt +++ b/compiler/testData/diagnostics/tests/funInterface/severalConversionsForFunInterface.txt @@ -11,7 +11,7 @@ public interface J { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public interface KRunnable { +public fun interface KRunnable { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract fun run(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.txt b/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.txt index e0b84d4ad8b..a5aac0270cb 100644 --- a/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.txt +++ b/compiler/testData/diagnostics/tests/funInterface/suspendFunInterfaceConversion.txt @@ -4,7 +4,7 @@ public suspend fun bar(): kotlin.Unit public fun run(/*0*/ r: SuspendRunnable): kotlin.Unit public fun test(): kotlin.Unit -public interface SuspendRunnable { +public fun interface SuspendRunnable { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract suspend fun invoke(): kotlin.Unit diff --git a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRenderer.kt b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRenderer.kt index a3f14910fff..3d5e1ceb257 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRenderer.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRenderer.kt @@ -303,6 +303,7 @@ enum class DescriptorRendererModifier(val includeByDefault: Boolean) { ACTUAL(true), CONST(true), LATEINIT(true), + FUN(true) ; companion object { diff --git a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt index 1412e6590c1..8c19a076b4f 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.kt @@ -979,6 +979,7 @@ internal class DescriptorRendererImpl( renderModifier(builder, DescriptorRendererModifier.INNER in modifiers && klass.isInner, "inner") renderModifier(builder, DescriptorRendererModifier.DATA in modifiers && klass.isData, "data") renderModifier(builder, DescriptorRendererModifier.INLINE in modifiers && klass.isInline, "inline") + renderModifier(builder, DescriptorRendererModifier.FUN in modifiers && klass.isFun, "fun") renderClassKindPrefix(klass, builder) }