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 ee76b27cf1c..935a0522047 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java @@ -660,7 +660,7 @@ public class DefaultErrorMessages { MAP.put(SUPERTYPE_NOT_A_CLASS_OR_INTERFACE, "Only classes and interfaces may serve as supertypes"); MAP.put(SUPERTYPE_IS_EXTENSION_FUNCTION_TYPE, "Extension function type is not allowed as supertypes"); MAP.put(SUPERTYPE_INITIALIZED_IN_INTERFACE, "Interfaces cannot initialize supertypes"); - MAP.put(SUPERTYPE_IS_SUSPEND_FUNCTION_TYPE, "Suspend function type is not allowed as supertypes"); + MAP.put(SUPERTYPE_IS_SUSPEND_FUNCTION_TYPE, "Suspend function type is allowed as a supertype only since version 1.6"); MAP.put(SUPERTYPE_IS_KSUSPEND_FUNCTION_TYPE, "KSuspendFunctionN interfaces are not allowed as supertypes"); MAP.put(MIXING_SUSPEND_AND_NON_SUSPEND_SUPERTYPES, "Mixing suspend and non-suspend supertypes is not allowed"); MAP.put(CLASS_IN_SUPERTYPE_FOR_ENUM, "Enum class cannot inherit from classes"); diff --git a/compiler/testData/integration/ant/jvm/languageVersion/build.log.expected b/compiler/testData/integration/ant/jvm/languageVersion/build.log.expected index 1210ec1b779..37c54714267 100644 --- a/compiler/testData/integration/ant/jvm/languageVersion/build.log.expected +++ b/compiler/testData/integration/ant/jvm/languageVersion/build.log.expected @@ -3,7 +3,7 @@ Buildfile: [TestData]/build.xml build: [kotlinc] Compiling [[TestData]/main.kt] => [[Temp]/hello.jar] - [kotlinc] [TestData]/main.kt:1:15: error: suspend function type is not allowed as supertypes + [kotlinc] [TestData]/main.kt:1:15: error: suspend function type is allowed as a supertype only since version 1.6 [kotlinc] interface A : suspend () -> Unit [kotlinc] ^ diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/SimpleKotlinGradleIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/SimpleKotlinGradleIT.kt index aa98813e3ef..926ca21bf2f 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/SimpleKotlinGradleIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/SimpleKotlinGradleIT.kt @@ -68,7 +68,7 @@ class SimpleKotlinGradleIT : KGPBaseTest() { fun testLanguageVersion(gradleVersion: GradleVersion) { project("languageVersion", gradleVersion) { buildAndFail("build") { - assertOutputContains("Suspend function type is not allowed as supertypes") + assertOutputContains("Suspend function type is allowed as a supertype only since version 1.6") } } } diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-languageVersion/verify.bsh b/libraries/tools/kotlin-maven-plugin-test/src/it/test-languageVersion/verify.bsh index eb0a824cb3e..621c2281997 100644 --- a/libraries/tools/kotlin-maven-plugin-test/src/it/test-languageVersion/verify.bsh +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-languageVersion/verify.bsh @@ -1,4 +1,4 @@ source(new File(basedir, "../../../verify-common.bsh").getAbsolutePath()); assertBuildLogHasLine("[INFO] BUILD FAILURE"); -assertBuildLogHasLineThatContains("Suspend function type is not allowed as supertypes"); +assertBuildLogHasLineThatContains("Suspend function type is allowed as a supertype only since version 1.6");