diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java index 2a53007bbc3..6f249ef36da 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java @@ -115,7 +115,7 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension { "Please make explicit overrides (abstract or concrete) for the following non-abstract members of ''{1}'': {2}", NAME, NAME, STRING); - MAP.put(DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET, "Super calls to Java default methods are deprecated in JVM target 1.6. Recompile with '-jvm-target 1.8'"); + MAP.put(DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET, "Super calls to Java default methods are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'"); MAP.put(INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET, "Calls to static methods in Java interfaces are deprecated in JVM target 1.6. Recompile with '-jvm-target 1.8'"); MAP.put(INLINE_FROM_HIGHER_PLATFORM, "Cannot inline bytecode built with {0} into bytecode that is being built with {1}. Please specify proper ''-jvm-target'' option", STRING, STRING); diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java index 8e45318e108..4a4ff69b75e 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java @@ -96,7 +96,7 @@ public interface ErrorsJvm { DiagnosticFactory3 TARGET6_INTERFACE_INHERITANCE = DiagnosticFactory3.create(ERROR); - DiagnosticFactory0 DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET = DiagnosticFactory0.create(WARNING); + DiagnosticFactory0 DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 INTERFACE_STATIC_METHOD_CALL_FROM_JAVA6_TARGET = DiagnosticFactory0.create(WARNING); DiagnosticFactory2 INLINE_FROM_HIGHER_PLATFORM = DiagnosticFactory2.create(ERROR); diff --git a/compiler/testData/codegen/java8/box/capturedSuperCall.kt b/compiler/testData/codegen/java8/box/capturedSuperCall.kt index 78dfc58c5e3..5991b0bf5e1 100644 --- a/compiler/testData/codegen/java8/box/capturedSuperCall.kt +++ b/compiler/testData/codegen/java8/box/capturedSuperCall.kt @@ -11,6 +11,7 @@ open class Base { fun foo() = "OK" } +@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET") class C : Base(), IBase { val lambda1 = { super.foo() diff --git a/compiler/testData/codegen/java8/box/inheritKotlin.kt b/compiler/testData/codegen/java8/box/inheritKotlin.kt index c030002894f..78f37a582e0 100644 --- a/compiler/testData/codegen/java8/box/inheritKotlin.kt +++ b/compiler/testData/codegen/java8/box/inheritKotlin.kt @@ -15,6 +15,7 @@ interface KInterface { } class Test : Simple { + @kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET") fun bar(): String { return super.test() } diff --git a/compiler/testData/codegen/java8/box/invokeDefaultViaSuper.kt b/compiler/testData/codegen/java8/box/invokeDefaultViaSuper.kt index d65a2e38516..cce7b32f37b 100644 --- a/compiler/testData/codegen/java8/box/invokeDefaultViaSuper.kt +++ b/compiler/testData/codegen/java8/box/invokeDefaultViaSuper.kt @@ -13,12 +13,14 @@ interface KInterface : Test { } class KClass : Test { + @kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET") fun ktest(): String { return super.test() + test() } } class KTClass : KInterface { + @kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET") fun ktest(): String { return super.test() + test() } @@ -27,6 +29,7 @@ class KTClass : KInterface { fun box(): String { val p = object : KInterface { + @kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET") fun ktest(): String { return super.test() + test() } diff --git a/compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt b/compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt index 68492133b2d..21a6dfd8a84 100644 --- a/compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt +++ b/compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt @@ -15,6 +15,7 @@ interface K2 : K1 interface K3 : K2 class C : K3 { + @kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET") override fun foo() = super.foo() } diff --git a/idea/testData/codeInsight/overrideImplement/jdk8/overrideCollectionStream.kt.after b/idea/testData/codeInsight/overrideImplement/jdk8/overrideCollectionStream.kt.after index 0a11604d3fa..40ba4e99cd2 100644 --- a/idea/testData/codeInsight/overrideImplement/jdk8/overrideCollectionStream.kt.after +++ b/idea/testData/codeInsight/overrideImplement/jdk8/overrideCollectionStream.kt.after @@ -1,3 +1,4 @@ +// ERROR: Super calls to Java default methods are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8' import java.util.stream.Stream abstract class A : List {