diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_super_unresolved.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_super_unresolved.txt index 588b6bb8ee3..2ec13b3d8b0 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_super_unresolved.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_super_unresolved.txt @@ -28,4 +28,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR + diagnostic = ERROR \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguous.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguous.txt index f0169ca6f1c..12dbe11759e 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguous.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguous.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -30,7 +30,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -61,7 +61,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvoke.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvoke.txt index 6ace5d44471..89bd2c5c528 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvoke.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvoke.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = true partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -33,7 +33,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = false KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvokeWithReceiver.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvokeWithReceiver.txt index 5c8050d9c6a..1f7b5b433bf 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvokeWithReceiver.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvokeWithReceiver.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicable.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicable.txt index e76d057880c..06af937c1af 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicable.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicable.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtDelegatedConstructorCall: kind = SUPER_CALL partiallyAppliedSymbol = KtPartiallyAppliedSymbol: diff --git a/compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/diagnostics/js/FirJsErrorsDefaultMessages.kt b/compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/diagnostics/js/FirJsErrorsDefaultMessages.kt index 58318297f3e..bbd0dd2003f 100644 --- a/compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/diagnostics/js/FirJsErrorsDefaultMessages.kt +++ b/compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/diagnostics/js/FirJsErrorsDefaultMessages.kt @@ -155,7 +155,7 @@ object FirJsErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE, - "Can''t put non-external declarations in file marked with {0} annotation", + "Can''t put non-external declarations in file marked with ''{0}'' annotation", FirDiagnosticRenderers.RENDER_TYPE ) map.put( @@ -166,7 +166,7 @@ object FirJsErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( JS_EXTERNAL_ARGUMENT, - "Expected argument with external type, but type {0} is non-external", + "Expected argument with external type, but type ''{0}'' is non-external", FirDiagnosticRenderers.RENDER_TYPE ) map.put(JS_NAME_PROHIBITED_FOR_EXTENSION_PROPERTY, "@JsName is prohibited for extension properties") @@ -177,12 +177,12 @@ object FirJsErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(JS_NAME_ON_ACCESSOR_AND_PROPERTY, "@JsName can be either on a property or its accessors, not both of them") map.put( CANNOT_CHECK_FOR_EXTERNAL_INTERFACE, - "Cannot check for external interface: {0}", + "Cannot check for external interface: ''{0}''", FirDiagnosticRenderers.RENDER_TYPE, ) map.put( UNCHECKED_CAST_TO_EXTERNAL_INTERFACE, - "Unchecked cast to external interface: {0} to {1}", + "Unchecked cast to external interface: ''{0}'' to ''{1}''", FirDiagnosticRenderers.RENDER_TYPE, FirDiagnosticRenderers.RENDER_TYPE, ) @@ -191,7 +191,7 @@ object FirJsErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(WRONG_EXPORTED_DECLARATION, "Declaration of such kind ({0}) can''t be exported to JS", CommonRenderers.STRING) map.put( NON_EXPORTABLE_TYPE, - "Exported declaration uses non-exportable {0} type: {1}", + "Exported declaration uses non-exportable {0} type: ''{1}''", CommonRenderers.STRING, FirDiagnosticRenderers.RENDER_TYPE, ) diff --git a/compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/diagnostics/jvm/FirJvmErrorsDefaultMessages.kt b/compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/diagnostics/jvm/FirJvmErrorsDefaultMessages.kt index 629614b257f..2dd70adf4ec 100644 --- a/compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/diagnostics/jvm/FirJvmErrorsDefaultMessages.kt +++ b/compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/diagnostics/jvm/FirJvmErrorsDefaultMessages.kt @@ -83,7 +83,7 @@ object FirJvmErrorsDefaultMessages : BaseDiagnosticRendererFactory() { override val MAP = KtDiagnosticFactoryToRendererMap("FIR").also { map -> map.put(CONFLICTING_JVM_DECLARATIONS, "Platform declaration clash") - map.put(JAVA_TYPE_MISMATCH, "Java type mismatch expected {0} but found {1}. Use explicit cast", RENDER_TYPE, RENDER_TYPE) + map.put(JAVA_TYPE_MISMATCH, "Java type mismatch: expected ''{0}'' but found ''{1}''. Use explicit cast", RENDER_TYPE, RENDER_TYPE) map.put(UPPER_BOUND_CANNOT_BE_ARRAY, "Upper bound of a type parameter cannot be an array") map.put(STRICTFP_ON_CLASS, "'@Strictfp' annotation on classes is unsupported yet") map.put(SYNCHRONIZED_ON_ABSTRACT, "'@Synchronized' annotation cannot be used on abstract functions") diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrorsDefaultMessages.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrorsDefaultMessages.kt index 9711a4ff750..c4d9b19d7ae 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrorsDefaultMessages.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrorsDefaultMessages.kt @@ -746,7 +746,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(FUNCTION_CALL_EXPECTED, "Function invocation ''{0}({1})'' expected", TO_STRING, FUNCTION_PARAMETERS) map.put( FUNCTION_EXPECTED, - "Expression ''{0}'' of type {1} cannot be invoked as a function. The function ''invoke()'' is not found", TO_STRING, RENDER_TYPE + "Expression ''{0}'' of type ''{1}'' cannot be invoked as a function. The function ''invoke()'' is not found", TO_STRING, RENDER_TYPE ) map.put(INTERFACE_AS_FUNCTION, "Interface ''{0}'' does not have constructors.", SYMBOL) map.put(EXPECT_CLASS_AS_FUNCTION, "Expected class ''{0}'' does not have default constructor.", SYMBOL) @@ -801,7 +801,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(CYCLIC_INHERITANCE_HIERARCHY, "There's a cycle in the inheritance hierarchy for this type") map.put( EXPANDED_TYPE_CANNOT_BE_INHERITED, - "Type alias expands to {0}, which is not a class, an interface, or an object", + "Type alias expands to ''{0}'', which is not a class, an interface, or an object", RENDER_TYPE ) map.put(PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE, "Projections are not allowed for immediate arguments of a supertype") @@ -981,7 +981,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( PLUGIN_ANNOTATION_AMBIGUITY, - "Resolution of the annotation type is ambiguous between {1} and the plugin annotation {0}. Please specify a fully qualified annotation name", + "Resolution of the annotation type is ambiguous between ''{1}'' and the plugin annotation ''{0}''. Please specify a fully qualified annotation name", RENDER_TYPE, RENDER_TYPE ) @@ -1102,31 +1102,31 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { "Intersection types are only supported for definitely non-nullable types: right part should be non-nullable Any" ) - map.put(TYPE_MISMATCH, "Type mismatch: inferred type is {1} but {0} was expected", RENDER_TYPE, RENDER_TYPE, NOT_RENDERED) + map.put(TYPE_MISMATCH, "Type mismatch: inferred type is ''{1}'' but ''{0}'' was expected", RENDER_TYPE, RENDER_TYPE, NOT_RENDERED) map.put( TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR, "Type inference failed. The value of the type parameter {0} should be mentioned in input types (argument types, receiver type or expected type). Try to specify it explicitly.", SYMBOL ) - map.put(THROWABLE_TYPE_MISMATCH, "Throwable type mismatch: actual type is {0}", RENDER_TYPE, NOT_RENDERED) - map.put(CONDITION_TYPE_MISMATCH, "Condition type mismatch: inferred type is {0} but Boolean was expected", RENDER_TYPE, NOT_RENDERED) + map.put(THROWABLE_TYPE_MISMATCH, "Throwable type mismatch: actual type is ''{0}''", RENDER_TYPE, NOT_RENDERED) + map.put(CONDITION_TYPE_MISMATCH, "Condition type mismatch: inferred type is ''{0}'' but Boolean was expected", RENDER_TYPE, NOT_RENDERED) map.put( ARGUMENT_TYPE_MISMATCH, - "Argument type mismatch: actual type is {1} but {0} was expected", + "Argument type mismatch: actual type is ''{1}'' but ''{0}'' was expected", RENDER_TYPE, RENDER_TYPE, NOT_RENDERED ) map.put( ASSIGNMENT_TYPE_MISMATCH, - "Assignment type mismatch: actual type is {1} but {0} was expected", + "Assignment type mismatch: actual type is ''{1}'' but ''{0}'' was expected", RENDER_TYPE, RENDER_TYPE, NOT_RENDERED ) map.put( RESULT_TYPE_MISMATCH, - "Function return type mismatch: actual type is {1} but {0} was expected", + "Function return type mismatch: actual type is ''{1}'' but ''{0}'' was expected", RENDER_TYPE, RENDER_TYPE, ) @@ -1140,10 +1140,10 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(AMBIGUOUS_FUNCTION_TYPE_KIND, "Multiple functional type conversions are not allowed for a single type. Detected type conversions: {0}", FUNCTIONAL_TYPE_KINDS) map.put(NEXT_NONE_APPLICABLE, "None of the ''next()'' functions is applicable for ''iterator()'' of type ''{0}''", SYMBOLS) - map.put(NO_CONTEXT_RECEIVER, "No required context receiver found: {0}", RENDER_TYPE) + map.put(NO_CONTEXT_RECEIVER, "No required context receiver found: ''{0}''", RENDER_TYPE) map.put( MULTIPLE_ARGUMENTS_APPLICABLE_FOR_CONTEXT_RECEIVER, - "Multiple arguments applicable for context receiver: {0}", + "Multiple arguments applicable for context receiver: ''{0}''", RENDER_TYPE ) map.put( @@ -1206,7 +1206,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(TYPE_PARAMETERS_IN_ENUM, "Enum class cannot have type parameters") map.put( CONFLICTING_PROJECTION, - "Projection is conflicting with variance of the corresponding type parameter of {0}. Remove the projection or replace it with ''*''", + "Projection is conflicting with variance of the corresponding type parameter of ''{0}''. Remove the projection or replace it with ''*''", RENDER_TYPE ) map.put( @@ -1216,7 +1216,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( REDUNDANT_PROJECTION, - "Projection is redundant: the corresponding type parameter of {0} has the same variance", + "Projection is redundant: the corresponding type parameter of ''{0}'' has the same variance", RENDER_TYPE ) map.put( @@ -1255,8 +1255,8 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { RENDER_TYPE ) map.put(UPPER_BOUND_IS_EXTENSION_FUNCTION_TYPE, "Extension function type can not be used as an upper bound") - map.put(INCOMPATIBLE_TYPES, "Incompatible types: {0} and {1}", RENDER_TYPE, RENDER_TYPE) - map.put(INCOMPATIBLE_TYPES_WARNING, "Potentially incompatible types: {0} and {1}", RENDER_TYPE, RENDER_TYPE) + map.put(INCOMPATIBLE_TYPES, "Incompatible types: ''{0}'' and ''{1}''", RENDER_TYPE, RENDER_TYPE) + map.put(INCOMPATIBLE_TYPES_WARNING, "Potentially incompatible types: ''{0}'' and ''{1}''", RENDER_TYPE, RENDER_TYPE) map.put( SMARTCAST_IMPOSSIBLE, "Smart cast to ''{0}'' is impossible, because ''{1}'' is a {2}", @@ -1268,12 +1268,12 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put( TYPE_VARIANCE_CONFLICT_ERROR, - "Type parameter {0} is declared as ''{1}'' but occurs in ''{2}'' position in type {3}", + "Type parameter {0} is declared as ''{1}'' but occurs in ''{2}'' position in type ''{3}''", SYMBOL, RENDER_POSITION_VARIANCE, RENDER_POSITION_VARIANCE, RENDER_TYPE ) map.put( TYPE_VARIANCE_CONFLICT_IN_EXPANDED_TYPE, - "Type parameter {0} is declared as ''{1}'' but occurs in ''{2}'' position in abbreviated type {3}", + "Type parameter {0} is declared as ''{1}'' but occurs in ''{2}'' position in abbreviated type ''{3}''", SYMBOL, RENDER_POSITION_VARIANCE, RENDER_POSITION_VARIANCE, RENDER_TYPE ) @@ -1310,7 +1310,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put( RETURN_TYPE_MISMATCH, - "Return type mismatch: expected {0}, actual {1}", + "Return type mismatch: expected ''{0}'', actual ''{1}''", RENDER_TYPE, RENDER_TYPE, NOT_RENDERED, @@ -1625,7 +1625,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(FUN_INTERFACE_WITH_SUSPEND_FUNCTION, "Fun interface abstract method can not be suspend") map.put(MULTIPLE_VARARG_PARAMETERS, "Multiple vararg-parameters are prohibited") - map.put(FORBIDDEN_VARARG_PARAMETER_TYPE, "Forbidden vararg parameter type: {0}", RENDER_TYPE) + map.put(FORBIDDEN_VARARG_PARAMETER_TYPE, "Forbidden vararg parameter type: ''{0}''", RENDER_TYPE) map.put(VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION, "A type annotation is required on a value parameter") map.put(CANNOT_INFER_PARAMETER_TYPE, "cannot infer a type for this parameter. Please specify it explicitly.") map.put(NO_TAIL_CALLS_FOUND, "A function is marked as tail-recursive but no tail calls are found.") @@ -1693,7 +1693,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { "It''s forbidden to use the extension property type parameter ''{0}'' in delegate. See https://youtrack.jetbrains.com/issue/KT-24643", SYMBOL ) - map.put(INITIALIZER_TYPE_MISMATCH, "Initializer type mismatch: expected {0}, actual {1}", RENDER_TYPE, RENDER_TYPE, NOT_RENDERED) + map.put(INITIALIZER_TYPE_MISMATCH, "Initializer type mismatch: expected ''{0}'', actual ''{1}''", RENDER_TYPE, RENDER_TYPE, NOT_RENDERED) map.put(GETTER_VISIBILITY_DIFFERS_FROM_PROPERTY_VISIBILITY, "Getter visibility must be the same as property visibility") map.put( SETTER_VISIBILITY_INCONSISTENT_WITH_PROPERTY_VISIBILITY, @@ -1852,7 +1852,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION, "Initializer required for destructuring declaration") map.put( COMPONENT_FUNCTION_MISSING, - "Destructuring declaration initializer of type {1} must have a ''{0}()'' function", + "Destructuring declaration initializer of type ''{1}'' must have a ''{0}()'' function", TO_STRING, RENDER_TYPE ) @@ -1939,10 +1939,10 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { NOT_RENDERED, NOT_RENDERED, ) - map.put(UNNECESSARY_NOT_NULL_ASSERTION, "Unnecessary non-null assertion (!!) on a non-null receiver of type {0}", RENDER_TYPE) + map.put(UNNECESSARY_NOT_NULL_ASSERTION, "Unnecessary non-null assertion (!!) on a non-null receiver of type ''{0}''", RENDER_TYPE) map.put(NOT_NULL_ASSERTION_ON_LAMBDA_EXPRESSION, "Non-null assertion (!!) is called on a lambda expression") map.put(NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE, "Non-null assertion (!!) is called on a callable reference expression") - map.put(UNNECESSARY_SAFE_CALL, "Unnecessary safe call on a non-null receiver of type {0}", RENDER_TYPE) + map.put(UNNECESSARY_SAFE_CALL, "Unnecessary safe call on a non-null receiver of type ''{0}''", RENDER_TYPE) map.put( SAFE_CALL_WILL_CHANGE_NULLABILITY, """ @@ -1951,14 +1951,14 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { | In future releases all safe calls will have nullable type: SomeType?""".trimMargin() ) map.put(UNEXPECTED_SAFE_CALL, "Safe-call is not allowed here") - map.put(USELESS_ELVIS, "Elvis operator (?:) always returns the left operand of non-nullable type {0}", RENDER_TYPE) + map.put(USELESS_ELVIS, "Elvis operator (?:) always returns the left operand of non-nullable type ''{0}''", RENDER_TYPE) map.put(USELESS_ELVIS_RIGHT_IS_NULL, "Right operand of elvis operator (?:) is useless if it is null") // Casts and is-checks - map.put(CANNOT_CHECK_FOR_ERASED, "Cannot check for instance of erased type: {0}", RENDER_TYPE) + map.put(CANNOT_CHECK_FOR_ERASED, "Cannot check for instance of erased type: ''{0}''", RENDER_TYPE) map.put(CAST_NEVER_SUCCEEDS, "This cast can never succeed") map.put(USELESS_CAST, "No cast needed") - map.put(UNCHECKED_CAST, "Unchecked cast: {0} to {1}", RENDER_TYPE, RENDER_TYPE) + map.put(UNCHECKED_CAST, "Unchecked cast: ''{0}'' to ''{1}''", RENDER_TYPE, RENDER_TYPE) map.put(USELESS_IS_CHECK, "Check for instance is always ''{0}''", TO_STRING) map.put(IS_ENUM_ENTRY, "'is' over enum entry is not allowed, use comparison instead") map.put(ENUM_ENTRY_AS_TYPE, "Use of enum entry names as types is not allowed, use enum type instead") @@ -2086,25 +2086,25 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( FORBIDDEN_IDENTITY_EQUALS, - "Identity equality for arguments of types {0} and {1} is forbidden", + "Identity equality for arguments of types ''{0}'' and ''{1}'' is forbidden", RENDER_TYPE, RENDER_TYPE ) map.put( FORBIDDEN_IDENTITY_EQUALS_WARNING, - "Identity equality for arguments of types {0} and {1} is forbidden", + "Identity equality for arguments of types ''{0}'' and ''{1}'' is forbidden", RENDER_TYPE, RENDER_TYPE ) map.put( DEPRECATED_IDENTITY_EQUALS, - "Identity equality for arguments of types {0} and {1} is deprecated", + "Identity equality for arguments of types ''{0}'' and ''{1}'' is deprecated", RENDER_TYPE, RENDER_TYPE ) map.put( IMPLICIT_BOXING_IN_IDENTITY_EQUALS, - "Identity equality for arguments of types {0} and {1} can be unstable because of implicit boxing", + "Identity equality for arguments of types ''{0}'' and ''{1}'' can be unstable because of implicit boxing", RENDER_TYPE, RENDER_TYPE ) @@ -2132,7 +2132,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(RECURSIVE_TYPEALIAS_EXPANSION, "Recursive type alias in expansion") map.put( TYPEALIAS_SHOULD_EXPAND_TO_CLASS, - "Type alias expands to {0}, which is not a class, an interface, or an object", + "Type alias expands to ''{0}'', which is not a class, an interface, or an object", RENDER_TYPE ) diff --git a/compiler/testData/cli/jvm/conflictingProjection.out b/compiler/testData/cli/jvm/conflictingProjection.out index 17d8c90974f..7defd1a58ba 100644 --- a/compiler/testData/cli/jvm/conflictingProjection.out +++ b/compiler/testData/cli/jvm/conflictingProjection.out @@ -1,5 +1,5 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/conflictingProjection.kt:10:19: error: projection is conflicting with variance of the corresponding type parameter of Out. Remove the projection or replace it with '*' +compiler/testData/cli/jvm/conflictingProjection.kt:10:19: error: projection is conflicting with variance of the corresponding type parameter of 'Out'. Remove the projection or replace it with '*' fun a8(value: Out) {} ^ compiler/testData/cli/jvm/conflictingProjection.kt:17:15: error: variance annotations are only allowed for type parameters of classes and interfaces @@ -11,7 +11,7 @@ typealias A14 = In compiler/testData/cli/jvm/conflictingProjection.kt:19:15: error: variance annotations are only allowed for type parameters of classes and interfaces typealias A15 = In ^ -compiler/testData/cli/jvm/conflictingProjection.kt:19:26: error: projection is conflicting with variance of the corresponding type parameter of In. Remove the projection or replace it with '*' +compiler/testData/cli/jvm/conflictingProjection.kt:19:26: error: projection is conflicting with variance of the corresponding type parameter of 'In'. Remove the projection or replace it with '*' typealias A15 = In ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.out b/compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.out index 4799647102f..337dcd7d86b 100644 --- a/compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.out +++ b/compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.out @@ -2,7 +2,7 @@ warning: language version 2.0 is experimental, there are no backwards compatibil compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: unresolved reference: NullPointerException throw NullPointerException() ^ -compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is ERROR CLASS: Unresolved name: NullPointerException but kotlin/Throwable was expected +compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is 'ERROR CLASS: Unresolved name: NullPointerException' but 'kotlin/Throwable' was expected throw NullPointerException() ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out b/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out index 29163b87408..157f101f505 100644 --- a/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out +++ b/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out @@ -11,7 +11,7 @@ compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: cannot a compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:7:20: error: 'this' is not defined in this context class B(other: B = this) ^ -compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is kotlin/Function0 but kotlin/Int was expected +compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is 'kotlin/Function0' but 'kotlin/Int' was expected constructor(x: Int) : this({ ^ compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '' before the instance has been initialized diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.fir.diag.txt index 8fc60f3995d..71dca623658 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.fir.diag.txt @@ -1,4 +1,4 @@ -/kt45461_25.fir.kt:(176,180): warning: Unchecked cast: kotlin/Nothing? to S +/kt45461_25.fir.kt:(176,180): warning: Unchecked cast: 'kotlin/Nothing?' to 'S' /kt45461_25.fir.kt:(206,209): warning: 'kotlin/Int' is a final type, and thus a value of the type parameter is predetermined diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.fir.diag.txt index c56d056930b..6c90bdfaf39 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.fir.diag.txt @@ -1,3 +1,3 @@ -/kt45461_26.fir.kt:(176,180): warning: Unchecked cast: kotlin/Nothing? to S +/kt45461_26.fir.kt:(176,180): warning: Unchecked cast: 'kotlin/Nothing?' to 'S' /kt45461_26.fir.kt:(224,232): warning: 'Out' is a final type, and thus a value of the type parameter is predetermined diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.fir.diag.txt index b382dcafe09..ba86e96236f 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.fir.diag.txt @@ -2,4 +2,4 @@ /kt48765.kt:(345,351): warning: 'kotlin/String' is a final type, and thus a value of the type parameter is predetermined -/kt48765.kt:(379,383): warning: Unchecked cast: kotlin/String to T +/kt48765.kt:(379,383): warning: Unchecked cast: 'kotlin/String' to 'T' diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.diag.txt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.diag.txt index 381a0160f53..3d3a2d40031 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.diag.txt @@ -1,7 +1,7 @@ -/main.kt:(98,103): error: Argument type mismatch: actual type is V but @EnhancedNullability V & Any was expected +/main.kt:(98,103): error: Argument type mismatch: actual type is 'V' but '@EnhancedNullability V & Any' was expected -/main.kt:(119,120): error: Argument type mismatch: actual type is kotlin/collections/List but ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability V & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability V & Any>> was expected +/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin/collections/List' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability V & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability V & Any>>' was expected -/main.kt:(133,138): error: Argument type mismatch: actual type is V but @EnhancedNullability E & Any was expected +/main.kt:(133,138): error: Argument type mismatch: actual type is 'V' but '@EnhancedNullability E & Any' was expected -/main.kt:(154,155): error: Argument type mismatch: actual type is kotlin/collections/List but ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability E & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability E & Any>> was expected +/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin/collections/List' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability E & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability E & Any>>' was expected diff --git a/plugins/assign-plugin/testData/diagnostics/localVariables.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/localVariables.fir.diag.txt index 0ffddf2be26..73cb346ae6c 100644 --- a/plugins/assign-plugin/testData/diagnostics/localVariables.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/localVariables.fir.diag.txt @@ -1,13 +1,13 @@ /localVariables.fir.kt:(401,409): error: Val cannot be reassigned -/localVariables.fir.kt:(412,418): error: Assignment type mismatch: actual type is kotlin/String but StringProperty was expected +/localVariables.fir.kt:(412,418): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected /localVariables.fir.kt:(521,529): error: Val cannot be reassigned -/localVariables.fir.kt:(673,679): error: Assignment type mismatch: actual type is kotlin/String but StringProperty was expected +/localVariables.fir.kt:(673,679): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected /localVariables.fir.kt:(917,925): error: Val cannot be reassigned -/localVariables.fir.kt:(928,934): error: Assignment type mismatch: actual type is kotlin/String but StringProperty was expected +/localVariables.fir.kt:(928,934): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected /localVariables.fir.kt:(995,1003): error: Val cannot be reassigned diff --git a/plugins/assign-plugin/testData/diagnostics/methodDeclaration.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/methodDeclaration.fir.diag.txt index f75f3e45151..f578c77370c 100644 --- a/plugins/assign-plugin/testData/diagnostics/methodDeclaration.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/methodDeclaration.fir.diag.txt @@ -10,4 +10,4 @@ /methodDeclaration.fir.kt:(870,875): error: Val cannot be reassigned -/methodDeclaration.fir.kt:(878,880): error: Assignment type mismatch: actual type is kotlin/Int but IntProperty was expected +/methodDeclaration.fir.kt:(878,880): error: Assignment type mismatch: actual type is 'kotlin/Int' but 'IntProperty' was expected diff --git a/plugins/assign-plugin/testData/diagnostics/noAnnotation.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/noAnnotation.fir.diag.txt index 318c12543ad..d53442267e4 100644 --- a/plugins/assign-plugin/testData/diagnostics/noAnnotation.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/noAnnotation.fir.diag.txt @@ -1,19 +1,19 @@ /noAnnotation.fir.kt:(424,429): error: Val cannot be reassigned -/noAnnotation.fir.kt:(432,436): error: Assignment type mismatch: actual type is kotlin/String but StringProperty was expected +/noAnnotation.fir.kt:(432,436): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected /noAnnotation.fir.kt:(446,451): error: Val cannot be reassigned /noAnnotation.fir.kt:(500,505): error: Val cannot be reassigned -/noAnnotation.fir.kt:(508,512): error: Assignment type mismatch: actual type is kotlin/String but StringProperty was expected +/noAnnotation.fir.kt:(508,512): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected /noAnnotation.fir.kt:(544,549): error: Val cannot be reassigned /noAnnotation.fir.kt:(588,593): error: Val cannot be reassigned -/noAnnotation.fir.kt:(596,598): error: Assignment type mismatch: actual type is kotlin/Int but StringProperty was expected +/noAnnotation.fir.kt:(596,598): error: Assignment type mismatch: actual type is 'kotlin/Int' but 'StringProperty' was expected /noAnnotation.fir.kt:(624,629): error: Val cannot be reassigned -/noAnnotation.fir.kt:(632,634): error: Assignment type mismatch: actual type is kotlin/Int but StringProperty was expected +/noAnnotation.fir.kt:(632,634): error: Assignment type mismatch: actual type is 'kotlin/Int' but 'StringProperty' was expected