diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt index 51254484ef3..f08d5218ed0 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt @@ -85,8 +85,11 @@ public object ModifierCheckerCore { ) private val deprecatedParentTargetMap = mapOf>( + // Deprecated in M14, forbidden in M15 INTERNAL_KEYWORD to EnumSet.of(INTERFACE), - PROTECTED_KEYWORD to EnumSet.of(INTERFACE) + PROTECTED_KEYWORD to EnumSet.of(INTERFACE), + // Deprecated in M15 + FINAL_KEYWORD to EnumSet.of(INTERFACE) ) // First modifier in pair should be also first in declaration diff --git a/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt b/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt index 8efc12249f6..879bbb80179 100644 --- a/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt +++ b/compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt @@ -1,5 +1,5 @@ interface T { - final fun component1(): Int = 42 + final fun component1(): Int = 42 } data class A(val x: Int) : T diff --git a/compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt b/compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt index 7149a9f90fb..656caa94a56 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt @@ -2,14 +2,14 @@ package a interface T { - final fun foo() - final val b : Int + final fun foo() + final val b : Int - final fun bar() {} - final val c : Int + final fun bar() {} + final val c : Int get() = 42 - final val d = 1 + final val d = 1 } class A { diff --git a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt index d05ad876402..eeff471002c 100644 --- a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt +++ b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt @@ -30,9 +30,6 @@ abstract class A { interface B { inline private fun good1() {} - inline public final fun good2() {} - inline final fun good3() {} - inline final fun good4() {} inline fun wrong1() {} diff --git a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.txt b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.txt index cc818703e09..fddeb1f61b5 100644 --- a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.txt +++ b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.txt @@ -24,9 +24,6 @@ public abstract class A { public interface B { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @kotlin.inline() private final fun good1(): kotlin.Unit - @kotlin.inline() public final fun good2(): kotlin.Unit - @kotlin.inline() public final fun good3(): kotlin.Unit - @kotlin.inline() public final fun good4(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String @kotlin.inline() public open fun wrong1(): kotlin.Unit