diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java index 11e4143773b..5b90761dbc8 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java @@ -394,7 +394,7 @@ public class DefaultErrorMessages { (obj, renderingContext) -> obj.equals(VersionRequirement.Version.INFINITY) ? "" : " is only available since Kotlin " + obj.asString() + " and", versionRequirementMessage); - MAP.put(OVERRIDE_DEPRECATION, "This declaration overrides deprecated member but not marked as deprecated itself. {0}Please add @Deprecated annotation or suppress", TO_STRING, TO_STRING, TO_STRING); + MAP.put(OVERRIDE_DEPRECATION, "This declaration overrides deprecated member but not marked as deprecated itself. {0}Please add @Deprecated annotation or suppress", TO_STRING, EMPTY, EMPTY); MAP.put(DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED, "DeprecatedSinceKotlin annotation can be used only together with Deprecated annotation"); MAP.put(DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL, "DeprecatedSinceKotlin annotation can be used only with unspecified deprecation level of Deprecated annotation"); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/DeprecationInheritanceChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/DeprecationInheritanceChecker.kt index 4329e558386..c5ed436e0f5 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/DeprecationInheritanceChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/DeprecationInheritanceChecker.kt @@ -19,7 +19,7 @@ object DeprecationInheritanceChecker : DeclarationChecker { val (deprecations, message) = if (context.languageVersionSettings.supportsFeature(StopPropagatingDeprecationThroughOverrides)) { deprecationResolver.getHiddenDeprecationsFromOverriden(descriptor) to "" } else { - deprecationResolver.getDeprecations(descriptor) to "This deprecation won't be inherited in kotlin 1.7. " + deprecationResolver.getDeprecations(descriptor) to "This deprecation won't be inherited in future releases. " } context.trace.report(Errors.OVERRIDE_DEPRECATION.on(declaration, message, descriptor, deprecations)) } diff --git a/compiler/testData/diagnostics/tests/j+k/deprecations/forMixedOverride.kt b/compiler/testData/diagnostics/tests/j+k/deprecations/forMixedOverride.kt index b7898c89865..b426f276988 100644 --- a/compiler/testData/diagnostics/tests/j+k/deprecations/forMixedOverride.kt +++ b/compiler/testData/diagnostics/tests/j+k/deprecations/forMixedOverride.kt @@ -16,7 +16,7 @@ interface WithDeprecation { } class A : J(), WithDeprecation { - override fun foo() {} + override fun foo() {} } fun main() {