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 935ac29993d..a2c440658ec 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java @@ -116,7 +116,7 @@ public class DefaultErrorMessages { MAP.put(TYPE_MISMATCH, "Type mismatch: inferred type is {1} but {0} was expected", RENDER_TYPE, RENDER_TYPE); MAP.put(TYPE_MISMATCH_DUE_TO_EQUALS_LAMBDA_IN_FUN, - "Inferred type is a function type, but a non-function type {0} was expected. Use either '= ...' or '{ ... }', but not both.", + "Inferred type is a function type, but a non-function type {0} was expected. Use either ''= ...'' or '''{ ... }'', but not both.", RENDER_TYPE); MAP.put(TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS, "Type mismatch: inferred type is {1} but {0} was expected. Projected type {2} restricts use of {3}", @@ -348,7 +348,7 @@ public class DefaultErrorMessages { MAP.put(NESTED_CLASS_SHOULD_BE_QUALIFIED, "Nested {0} should be qualified as ''{1}''", RENDER_CLASS_OR_OBJECT_NAME, TO_STRING); MAP.put(INACCESSIBLE_OUTER_CLASS_EXPRESSION, "Expression is inaccessible from a nested class ''{0}'', use ''inner'' keyword to make the class inner", NAME); - MAP.put(NESTED_CLASS_NOT_ALLOWED, "Nested class is not allowed here, use ''inner'' keyword to make the class inner"); + MAP.put(NESTED_CLASS_NOT_ALLOWED, "Nested class is not allowed here, use 'inner' keyword to make the class inner"); MAP.put(HAS_NEXT_MISSING, "hasNext() cannot be called on iterator() of type ''{0}''", RENDER_TYPE); MAP.put(HAS_NEXT_FUNCTION_AMBIGUITY, "hasNext() is ambiguous for iterator() of type ''{0}''", RENDER_TYPE); @@ -377,7 +377,7 @@ public class DefaultErrorMessages { MAP.put(INVALID_CHARACTERS, "Name {0}", STRING); MAP.put(INAPPLICABLE_OPERATOR_MODIFIER, "''operator'' modifier is inapplicable on this function: {0}", STRING); - MAP.put(INAPPLICABLE_INFIX_MODIFIER, "'infix' modifier is inapplicable on this function: {0}", STRING); + MAP.put(INAPPLICABLE_INFIX_MODIFIER, "''infix'' modifier is inapplicable on this function: {0}", STRING); MAP.put(OPERATOR_MODIFIER_REQUIRED, "''operator'' modifier is required on ''{0}'' in ''{1}''", NAME, STRING); MAP.put(INFIX_MODIFIER_REQUIRED, "''infix'' modifier is required on ''{0}'' in ''{1}''", NAME, STRING); diff --git a/idea/testData/intentions/toInfixCall/multipleArguments.kt b/idea/testData/intentions/toInfixCall/multipleArguments.kt index b37e6b77bbb..a800ee0064b 100644 --- a/idea/testData/intentions/toInfixCall/multipleArguments.kt +++ b/idea/testData/intentions/toInfixCall/multipleArguments.kt @@ -1,5 +1,5 @@ // IS_APPLICABLE: false -// ERROR: infix modifier is inapplicable on this function: must have a single value parameter +// ERROR: 'infix' modifier is inapplicable on this function: must have a single value parameter interface Foo { infix fun foo(a: Int, b: Int) } diff --git a/idea/testData/intentions/toInfixCall/namedArgument.kt b/idea/testData/intentions/toInfixCall/namedArgument.kt index 80860443e00..f00e79007a6 100644 --- a/idea/testData/intentions/toInfixCall/namedArgument.kt +++ b/idea/testData/intentions/toInfixCall/namedArgument.kt @@ -1,5 +1,5 @@ // IS_APPLICABLE: false -// ERROR: infix modifier is inapplicable on this function: must have a single value parameter +// ERROR: 'infix' modifier is inapplicable on this function: must have a single value parameter fun foo(x: Foo) { x.foo(bar = x) } diff --git a/idea/testData/intentions/toInfixCall/noExplicitReceiver.kt b/idea/testData/intentions/toInfixCall/noExplicitReceiver.kt index da6a69641fd..b5f72929c04 100644 --- a/idea/testData/intentions/toInfixCall/noExplicitReceiver.kt +++ b/idea/testData/intentions/toInfixCall/noExplicitReceiver.kt @@ -1,4 +1,4 @@ // IS_APPLICABLE: false -// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function +// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function infix fun id(s: String) = s val x = id("0").get(0) \ No newline at end of file diff --git a/idea/testData/intentions/toInfixCall/packageFunctionCall.kt b/idea/testData/intentions/toInfixCall/packageFunctionCall.kt index fb8097436fe..a19c5472fa4 100644 --- a/idea/testData/intentions/toInfixCall/packageFunctionCall.kt +++ b/idea/testData/intentions/toInfixCall/packageFunctionCall.kt @@ -1,5 +1,5 @@ // IS_APPLICABLE: false -// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function +// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function package ppp infix fun foo(p: String){} diff --git a/idea/testData/intentions/toInfixCall/secondParameterLabeled.kt b/idea/testData/intentions/toInfixCall/secondParameterLabeled.kt index 990e488b0f4..d554166556a 100644 --- a/idea/testData/intentions/toInfixCall/secondParameterLabeled.kt +++ b/idea/testData/intentions/toInfixCall/secondParameterLabeled.kt @@ -1,5 +1,5 @@ // IS_APPLICABLE: false -// ERROR: infix modifier is inapplicable on this function: must have a single value parameter +// ERROR: 'infix' modifier is inapplicable on this function: must have a single value parameter class Foo { infix fun foo(x: Int = 0, y: Int = 0) { diff --git a/idea/testData/intentions/toInfixCall/simpleArgumentAndFunctionLiteralArgument.kt b/idea/testData/intentions/toInfixCall/simpleArgumentAndFunctionLiteralArgument.kt index b3df37ef240..3dc9f8da013 100644 --- a/idea/testData/intentions/toInfixCall/simpleArgumentAndFunctionLiteralArgument.kt +++ b/idea/testData/intentions/toInfixCall/simpleArgumentAndFunctionLiteralArgument.kt @@ -1,5 +1,5 @@ // IS_APPLICABLE: false -// ERROR: infix modifier is inapplicable on this function: must have a single value parameter +// ERROR: 'infix' modifier is inapplicable on this function: must have a single value parameter fun foo(x: Foo) { x.foo(1) { it * 2 } diff --git a/idea/testData/intentions/toInfixCall/singlePackageFunctionCall.kt b/idea/testData/intentions/toInfixCall/singlePackageFunctionCall.kt index d041d97ca2e..af53d11507d 100644 --- a/idea/testData/intentions/toInfixCall/singlePackageFunctionCall.kt +++ b/idea/testData/intentions/toInfixCall/singlePackageFunctionCall.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // IS_APPLICABLE: false -// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function +// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function package demo diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt b/idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt index ad23af0ca14..b50f6bcc0c8 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt @@ -1,5 +1,5 @@ // "Replace with 'newFun(p, this)'" "true" -// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function +// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function @Deprecated("", ReplaceWith("newFun(p, this)")) infix fun String.oldFun(p: Int) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt.after index 0cf9e355d4c..bf49c4823b7 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt.after @@ -1,5 +1,5 @@ // "Replace with 'newFun(p, this)'" "true" -// ERROR: infix modifier is inapplicable on this function: must be a member of an extension function +// ERROR: 'infix' modifier is inapplicable on this function: must be a member of an extension function @Deprecated("", ReplaceWith("newFun(p, this)")) infix fun String.oldFun(p: Int) {