From 7150be7c675955055a85ae129a732787b1ae8607 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Tue, 20 Oct 2015 15:30:25 +0300 Subject: [PATCH] Minor: fixed error message --- .../kotlin/diagnostics/rendering/DefaultErrorMessages.java | 2 +- .../callExpression/typeArguments/classMemberInner.kt | 2 +- .../callExpression/typeArguments/classMemberInner.kt.after | 2 +- .../typeArguments/classMemberInnerWithReceiverArg.kt | 2 +- .../typeArguments/classMemberInnerWithReceiverArg.kt.after | 2 +- idea/testData/quickfix/deprecatedSymbolUsage/incorrectArgs.kt | 2 +- .../wrongTypeMultiple.after.kt | 2 +- .../wrongTypeMultiple.before.Main.kt | 2 +- .../quickfix/suppress/errorRecovery/nonStringInSuppress.kt | 2 +- .../suppress/errorRecovery/nonStringInSuppress.kt.after | 2 +- .../componentFunctionReturnTypeMismatch4.kt | 2 +- .../componentFunctionReturnTypeMismatch4.kt.after | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) 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 6161a172f52..2a4389a7310 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java @@ -397,7 +397,7 @@ public class DefaultErrorMessages { MAP.put(TOO_MANY_ARGUMENTS, "Too many arguments for {0}", FQ_NAMES_IN_TYPES); - MAP.put(CONSTANT_EXPECTED_TYPE_MISMATCH, "An {0} literal does not conform to the expected type {1}", STRING, RENDER_TYPE); + MAP.put(CONSTANT_EXPECTED_TYPE_MISMATCH, "The {0} literal does not conform to the expected type {1}", STRING, RENDER_TYPE); MAP.put(DIVISION_BY_ZERO, "Division by zero"); MAP.put(INTEGER_OVERFLOW, "This operation has led to an overflow"); MAP.put(INT_LITERAL_OUT_OF_RANGE, "The value is out of range"); diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt index 31a80c3cbaa..f0b172f3b87 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt @@ -1,6 +1,6 @@ // "Create class 'Foo'" "true" // ERROR: Type mismatch.
Required:V
Found:kotlin.String
-// ERROR: An integer literal does not conform to the expected type U +// ERROR: The integer literal does not conform to the expected type U class B(val t: T) { diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt.after b/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt.after index 0f4d5320c44..1b8fbbb96f8 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt.after @@ -1,6 +1,6 @@ // "Create class 'Foo'" "true" // ERROR: Type mismatch.
Required:V
Found:kotlin.String
-// ERROR: An integer literal does not conform to the expected type U +// ERROR: The integer literal does not conform to the expected type U class B(val t: T) { inner class Foo(u: U, v: V) { diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt index 399fbee707c..75d37afd310 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt @@ -1,6 +1,6 @@ // "Create class 'Foo'" "true" // ERROR: Type mismatch.
Required:W
Found:kotlin.String
-// ERROR: An integer literal does not conform to the expected type V +// ERROR: The integer literal does not conform to the expected type V class B(val t: T) { diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt.after b/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt.after index 77c04d54650..df3ea11fa39 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt.after @@ -1,6 +1,6 @@ // "Create class 'Foo'" "true" // ERROR: Type mismatch.
Required:W
Found:kotlin.String
-// ERROR: An integer literal does not conform to the expected type V +// ERROR: The integer literal does not conform to the expected type V class B(val t: T) { inner class Foo(v: V, w: W) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/incorrectArgs.kt b/idea/testData/quickfix/deprecatedSymbolUsage/incorrectArgs.kt index 15e8c4b0b62..166f8d71eec 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/incorrectArgs.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/incorrectArgs.kt @@ -1,5 +1,5 @@ // "class org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix" "false" -// ERROR: An integer literal does not conform to the expected type kotlin.String +// ERROR: The integer literal does not conform to the expected type kotlin.String @Deprecated("", ReplaceWith("newFun()", imports = 123)) fun oldFun() { diff --git a/idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.after.kt b/idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.after.kt index 98244586768..ca43952b1f9 100644 --- a/idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.after.kt +++ b/idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.after.kt @@ -1,6 +1,6 @@ // "Replace invalid positioned arguments for annotation" "true" // WITH_RUNTIME // ERROR: Only named arguments are available for Java annotations -// ERROR: An integer literal does not conform to the expected type kotlin.String +// ERROR: The integer literal does not conform to the expected type kotlin.String @Ann(1, arg1 = 2) class A diff --git a/idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.before.Main.kt b/idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.before.Main.kt index ef5c0ed5153..9456b60bfa7 100644 --- a/idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.before.Main.kt +++ b/idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.before.Main.kt @@ -1,6 +1,6 @@ // "Replace invalid positioned arguments for annotation" "true" // WITH_RUNTIME // ERROR: Only named arguments are available for Java annotations -// ERROR: An integer literal does not conform to the expected type kotlin.String +// ERROR: The integer literal does not conform to the expected type kotlin.String @Ann(1, 2) class A diff --git a/idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt b/idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt index 88234131815..b3bf71d985e 100644 --- a/idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt +++ b/idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt @@ -1,5 +1,5 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -// ERROR: An integer literal does not conform to the expected type kotlin.String +// ERROR: The integer literal does not conform to the expected type kotlin.String @Suppress(1) fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt.after b/idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt.after index d9b994dd9b1..8f42f01941f 100644 --- a/idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt.after +++ b/idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt.after @@ -1,5 +1,5 @@ // "Suppress 'REDUNDANT_NULLABLE' for fun foo" "true" -// ERROR: An integer literal does not conform to the expected type kotlin.String +// ERROR: The integer literal does not conform to the expected type kotlin.String @Suppress(1, "REDUNDANT_NULLABLE") fun foo(): String?? = null \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt index e5067c390fe..7fcf869866c 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt @@ -1,5 +1,5 @@ // "Change 'A.component2' function return type to 'Unit'" "true" -// ERROR: An integer literal does not conform to the expected type kotlin.Unit +// ERROR: The integer literal does not conform to the expected type kotlin.Unit abstract class A { abstract fun component1(): Int fun component2() = 42 diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after index d8bcc05f9e1..abbe2300836 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after @@ -1,5 +1,5 @@ // "Change 'A.component2' function return type to 'Unit'" "true" -// ERROR: An integer literal does not conform to the expected type kotlin.Unit +// ERROR: The integer literal does not conform to the expected type kotlin.Unit abstract class A { abstract fun component1(): Int fun component2(): Unit = 42