Fix error message for SUPERTYPE_IS_SUSPEND_FUNCTION_TYPE

#KT-48907 Fixed
This commit is contained in:
Mikhail Glukhikh
2022-01-10 19:07:29 +03:00
parent 1402bb2d45
commit 0f2f6334c2
4 changed files with 4 additions and 4 deletions
@@ -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");
@@ -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] ^
@@ -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")
}
}
}
@@ -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");