提交 72188960 编写于 作者: M Mikhail Glukhikh 提交者: Mikhail Glukhikh

Expect/actual: fix some error messages

上级 98e92387
...@@ -273,14 +273,14 @@ public class DefaultErrorMessages { ...@@ -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_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_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_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, MAP.put(NO_ACTUAL_FOR_EXPECT, "Expected {0} has no actual in module{1}{2}", DECLARATION_NAME_WITH_KIND,
PLATFORM, PlatformIncompatibilityDiagnosticRenderer.TEXT); PLATFORM, PlatformIncompatibilityDiagnosticRenderer.TEXT);
MAP.put(ACTUAL_WITHOUT_EXPECT, "Actual {0} has no corresponding expected declaration{1}", DECLARATION_NAME_WITH_KIND, MAP.put(ACTUAL_WITHOUT_EXPECT, "Actual {0} has no corresponding expected declaration{1}", DECLARATION_NAME_WITH_KIND,
PlatformIncompatibilityDiagnosticRenderer.TEXT); 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); NAME, IncompatibleExpectedActualClassScopesRenderer.TEXT);
MAP.put(ACTUAL_MISSING, "Declaration should be marked with 'actual' (suppress with -Xno-check-actual)"); MAP.put(ACTUAL_MISSING, "Declaration should be marked with 'actual' (suppress with -Xno-check-actual)");
......
...@@ -5,7 +5,7 @@ Output: ...@@ -5,7 +5,7 @@ Output:
-- JVM -- -- JVM --
Exit code: COMPILATION_ERROR Exit code: COMPILATION_ERROR
Output: 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 public final expect fun function(b: ByteArray): Int
......
...@@ -5,7 +5,7 @@ Output: ...@@ -5,7 +5,7 @@ Output:
-- JVM -- -- JVM --
Exit code: COMPILATION_ERROR Exit code: COMPILATION_ERROR
Output: 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) public constructor Foo(s: String)
......
...@@ -5,7 +5,7 @@ Output: ...@@ -5,7 +5,7 @@ Output:
-- JVM -- -- JVM --
Exit code: COMPILATION_ERROR Exit code: COMPILATION_ERROR
Output: 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 public final expect fun function(s: String): Unit
......
...@@ -11,7 +11,7 @@ The following declaration is incompatible because parameter types are different: ...@@ -11,7 +11,7 @@ The following declaration is incompatible because parameter types are different:
expect fun g(s: String) 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 public final expect fun f(a: Any): Unit
......
...@@ -5,7 +5,7 @@ Output: ...@@ -5,7 +5,7 @@ Output:
-- JVM -- -- JVM --
Exit code: COMPILATION_ERROR Exit code: COMPILATION_ERROR
Output: 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() protected constructor Writer()
......
...@@ -180,7 +180,7 @@ public class IdeErrorMessages { ...@@ -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, MAP.put(ACTUAL_WITHOUT_EXPECT, "<html>Actual {0} has no corresponding expected declaration{1}</html>", DECLARATION_NAME_WITH_KIND,
new PlatformIncompatibilityDiagnosticRenderer(IdeMultiplatformDiagnosticRenderingMode.INSTANCE)); 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)); NAME, new IncompatibleExpectedActualClassScopesRenderer(IdeMultiplatformDiagnosticRenderingMode.INSTANCE));
MAP.setImmutable(); MAP.setImmutable();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册