Expect/actual: fix some error messages
This commit is contained in:
committed by
Mikhail Glukhikh
parent
98e9238763
commit
721889600f
+2
-2
@@ -273,14 +273,14 @@ public class DefaultErrorMessages {
|
||||
MAP.put(ACTUAL_TYPE_ALIAS_NOT_TO_CLASS, "Right-hand side of actual type alias should be a class, not another type alias");
|
||||
MAP.put(ACTUAL_TYPE_ALIAS_TO_CLASS_WITH_DECLARATION_SITE_VARIANCE, "Aliased class should not have type parameters with declaration-site variance");
|
||||
MAP.put(ACTUAL_TYPE_ALIAS_WITH_USE_SITE_VARIANCE, "Right-hand side of actual type alias cannot contain use-site variance or star projections");
|
||||
MAP.put(ACTUAL_TYPE_ALIAS_WITH_COMPLEX_SUBSTITUTION, "Type arguments in the right-hand side of actual type alias should be its type parameters in the same order, e.g. 'impl typealias Foo<A, B> = Bar<A, B>'");
|
||||
MAP.put(ACTUAL_TYPE_ALIAS_WITH_COMPLEX_SUBSTITUTION, "Type arguments in the right-hand side of actual type alias should be its type parameters in the same order, e.g. 'actual typealias Foo<A, B> = Bar<A, B>'");
|
||||
|
||||
MAP.put(NO_ACTUAL_FOR_EXPECT, "Expected {0} has no actual in module{1}{2}", DECLARATION_NAME_WITH_KIND,
|
||||
PLATFORM, PlatformIncompatibilityDiagnosticRenderer.TEXT);
|
||||
MAP.put(ACTUAL_WITHOUT_EXPECT, "Actual {0} has no corresponding expected declaration{1}", DECLARATION_NAME_WITH_KIND,
|
||||
PlatformIncompatibilityDiagnosticRenderer.TEXT);
|
||||
|
||||
MAP.put(NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS, "In class ''{0}'' expected members have no actual ones:{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);
|
||||
MAP.put(ACTUAL_MISSING, "Declaration should be marked with 'actual' (suppress with -Xno-check-actual)");
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/functionIncorrectSignatureFromSuperclass/jvm.kt:5:14: error: in class 'Foo' expected members have no actual ones:
|
||||
compiler/testData/multiplatform/classScopes/functionIncorrectSignatureFromSuperclass/jvm.kt:5:14: error: actual class 'Foo' has no corresponding members for expected class members:
|
||||
|
||||
public final expect fun function(b: ByteArray): Int
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/missingConstructor/jvm.kt:1:14: error: in class 'Foo' expected members have no actual ones:
|
||||
compiler/testData/multiplatform/classScopes/missingConstructor/jvm.kt:1:14: error: actual class 'Foo' has no corresponding members for expected class members:
|
||||
|
||||
public constructor Foo(s: String)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/classScopes/missingFunction/jvm.kt:1:14: error: in class 'Foo' expected members have no actual ones:
|
||||
compiler/testData/multiplatform/classScopes/missingFunction/jvm.kt:1:14: error: actual class 'Foo' has no corresponding members for expected class members:
|
||||
|
||||
public final expect fun function(s: String): Unit
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ The following declaration is incompatible because parameter types are different:
|
||||
|
||||
expect fun g(s: String)
|
||||
^
|
||||
compiler/testData/multiplatform/missingOverload/jvm.kt:1:14: error: in class 'Foo' expected members have no actual ones:
|
||||
compiler/testData/multiplatform/missingOverload/jvm.kt:1:14: error: actual class 'Foo' has no corresponding members for expected class members:
|
||||
|
||||
public final expect fun f(a: Any): Unit
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@ Output:
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/regressions/incompatibleClassScopesWithImplTypeAlias/jvm.kt:3:1: error: in class 'Writer' expected members have no actual ones:
|
||||
compiler/testData/multiplatform/regressions/incompatibleClassScopesWithImplTypeAlias/jvm.kt:3:1: error: actual class 'Writer' has no corresponding members for expected class members:
|
||||
|
||||
protected constructor Writer()
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ public class IdeErrorMessages {
|
||||
MAP.put(ACTUAL_WITHOUT_EXPECT, "<html>Actual {0} has no corresponding expected declaration{1}</html>", DECLARATION_NAME_WITH_KIND,
|
||||
new PlatformIncompatibilityDiagnosticRenderer(IdeMultiplatformDiagnosticRenderingMode.INSTANCE));
|
||||
|
||||
MAP.put(NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS, "<html>In class ''{0}'' expected members have no actual ones:{1}</html>",
|
||||
MAP.put(NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS, "<html>Actual class ''{0}'' has no corresponding members for expected class members:{1}</html>",
|
||||
NAME, new IncompatibleExpectedActualClassScopesRenderer(IdeMultiplatformDiagnosticRenderingMode.INSTANCE));
|
||||
|
||||
MAP.setImmutable();
|
||||
|
||||
Reference in New Issue
Block a user