Simplify diagnostic message for ACTUAL_MISSING

#KT-21939 Fixed
This commit is contained in:
Alexander Udalov
2018-01-08 14:34:28 +01:00
parent 1530fbee1b
commit 8c6b140865
8 changed files with 8 additions and 8 deletions
@@ -261,7 +261,7 @@ public class DefaultErrorMessages {
MAP.put(NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS, "Actual class ''{0}'' has no corresponding members for expected class members:{1}", MAP.put(NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS, "Actual class ''{0}'' has no corresponding members for expected class members:{1}",
NAME, IncompatibleExpectedActualClassScopesRenderer.TEXT); NAME, IncompatibleExpectedActualClassScopesRenderer.TEXT);
MAP.put(ACTUAL_MISSING, "Declaration should be marked with 'actual' (suppress with -Xno-check-actual)"); MAP.put(ACTUAL_MISSING, "Declaration must be marked with 'actual'");
MAP.put(PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT, "Projections are not allowed on type arguments of functions and properties"); MAP.put(PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT, "Projections are not allowed on type arguments of functions and properties");
MAP.put(SUPERTYPE_NOT_INITIALIZED, "This type has a constructor, and thus must be initialized here"); MAP.put(SUPERTYPE_NOT_INITIALIZED, "This type has a constructor, and thus must be initialized here");
@@ -5,6 +5,6 @@ Output:
-- JVM -- -- JVM --
Exit code: COMPILATION_ERROR Exit code: COMPILATION_ERROR
Output: Output:
compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/jvm.kt:3:5: error: declaration should be marked with 'actual' (suppress with -Xno-check-actual) compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/jvm.kt:3:5: error: declaration must be marked with 'actual'
fun foo(s: String): Array<CharSequence?> = arrayOf(s) fun foo(s: String): Array<CharSequence?> = arrayOf(s)
^ ^
@@ -1,4 +1,4 @@
// "Add 'actual' modifier" "true" // "Add 'actual' modifier" "true"
// ERROR: Declaration should be marked with 'actual' (suppress with -Xno-check-actual) // ERROR: Declaration must be marked with 'actual'
class <caret>Foo class <caret>Foo
@@ -1,4 +1,4 @@
// "Add 'actual' modifier" "true" // "Add 'actual' modifier" "true"
// ERROR: Declaration should be marked with 'actual' (suppress with -Xno-check-actual) // ERROR: Declaration must be marked with 'actual'
actual class Foo actual class Foo
@@ -1,5 +1,5 @@
// "Add 'actual' modifier" "true" // "Add 'actual' modifier" "true"
// ERROR: Declaration should be marked with 'actual' (suppress with -Xno-check-actual) // ERROR: Declaration must be marked with 'actual'
actual class Foo { actual class Foo {
fun <caret>foo() {} fun <caret>foo() {}
@@ -1,5 +1,5 @@
// "Add 'actual' modifier" "true" // "Add 'actual' modifier" "true"
// ERROR: Declaration should be marked with 'actual' (suppress with -Xno-check-actual) // ERROR: Declaration must be marked with 'actual'
actual class Foo { actual class Foo {
actual fun foo() {} actual fun foo() {}
@@ -1,4 +1,4 @@
// "Add 'actual' modifier" "true" // "Add 'actual' modifier" "true"
// ERROR: Declaration should be marked with 'actual' (suppress with -Xno-check-actual) // ERROR: Declaration must be marked with 'actual'
fun <caret>foo() {} fun <caret>foo() {}
@@ -1,4 +1,4 @@
// "Add 'actual' modifier" "true" // "Add 'actual' modifier" "true"
// ERROR: Declaration should be marked with 'actual' (suppress with -Xno-check-actual) // ERROR: Declaration must be marked with 'actual'
actual fun foo() {} actual fun foo() {}