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 d63061438c7..82a7fd42ccd 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 @@ -105,7 +105,7 @@ object FirJsErrorsDefaultMessages : BaseDiagnosticRendererFactory() { WRONG_DEFAULT_VALUE_FOR_EXTERNAL_FUN_PARAMETER, "Wrong default value for parameter of external function. Must be ' = definedExternally'" ) - map.put(NESTED_EXTERNAL_DECLARATION, "Non top-level `external` declaration") + map.put(NESTED_EXTERNAL_DECLARATION, "Non-top-level `external` declaration") map.put(WRONG_EXTERNAL_DECLARATION, "Declaration of such kind ({0}) can''t be external", CommonRenderers.STRING) map.put(NESTED_CLASS_IN_EXTERNAL_INTERFACE, "Interface can't contain nested classes and objects") map.put(EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE, "External type extends non-external type") @@ -154,7 +154,7 @@ object FirJsErrorsDefaultMessages : BaseDiagnosticRendererFactory() { FirDiagnosticRenderers.RENDER_TYPE ) map.put(JS_NAME_PROHIBITED_FOR_EXTENSION_PROPERTY, "@JsName is prohibited for extension properties") - map.put(JS_NAME_IS_NOT_ON_ALL_ACCESSORS, "@JsName should be on all of the property accessors") + map.put(JS_NAME_IS_NOT_ON_ALL_ACCESSORS, "@JsName should be on all the property accessors") map.put(JS_NAME_PROHIBITED_FOR_NAMED_NATIVE, "@JsName is prohibited for external declaration with explicit name") map.put(JS_NAME_PROHIBITED_FOR_OVERRIDE, "@JsName is prohibited for overridden members") map.put(JS_NAME_ON_PRIMARY_CONSTRUCTOR_PROHIBITED, "@JsName annotation is prohibited for primary constructors") @@ -185,4 +185,4 @@ object FirJsErrorsDefaultMessages : BaseDiagnosticRendererFactory() { CommonRenderers.STRING, ) } -} \ No newline at end of file +} 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 55bae6d3ad8..13b741426e4 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 @@ -715,12 +715,12 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( RESOLUTION_TO_CLASSIFIER, - "Constructor of inner class {0} can be called only with receiver of containing class", + "Constructor of the inner class {0} can only be called with a receiver of the containing class", SYMBOL ) map.put( AMBIGUOUS_ALTERED_ASSIGN, - "Multiple extensions tried to alter this assignement at the same time. Extensions: {0}", + "Multiple extensions tried to alter this assignment at the same time. Extensions: {0}", COLLECTION(NULLABLE_STRING) ) map.put(DEPRECATED_BINARY_MOD, "Convention for ''{0}'' is forbidden. Use ''{1}''", SYMBOL, STRING) @@ -750,7 +750,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(MANY_CLASSES_IN_SUPERTYPE_LIST, "Only one class may appear in a supertype list") map.put(SUPERTYPE_APPEARS_TWICE, "A supertype appears twice") map.put(CLASS_IN_SUPERTYPE_FOR_ENUM, "Enum class cannot inherit from classes") - map.put(SEALED_SUPERTYPE, "This type is sealed, so it can be inherited by only its own nested classes or objects") + map.put(SEALED_SUPERTYPE, "This type is sealed, so it can only be inherited by its own nested classes or objects") map.put(SEALED_SUPERTYPE_IN_LOCAL_CLASS, "{0} cannot extend a sealed {1}", STRING, CLASS_KIND) map.put( SEALED_INHERITOR_IN_DIFFERENT_PACKAGE, @@ -807,10 +807,10 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(DATA_CLASS_NOT_PROPERTY_PARAMETER, "Data class primary constructor must only have property (val / var) parameters") // Annotations - map.put(ANNOTATION_USED_AS_ANNOTATION_ARGUMENT, "An annotation can't be used as the annotations argument") + map.put(ANNOTATION_USED_AS_ANNOTATION_ARGUMENT, "An annotation can't be used as an annotation argument") map.put(ANNOTATION_CLASS_MEMBER, "Members are not allowed in annotation class") map.put(ANNOTATION_ARGUMENT_MUST_BE_CONST, "An annotation argument must be a compile-time constant") - map.put(ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST, "An enum annotation argument must be a enum constant") + map.put(ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST, "An enum annotation argument must be an enum constant") map.put(ANNOTATION_ARGUMENT_MUST_BE_KCLASS_LITERAL, "An annotation argument must be a class literal (T::class)") map.put( ANNOTATION_ARGUMENT_KCLASS_LITERAL_OF_TYPE_PARAMETER_ERROR, @@ -843,11 +843,11 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED, - " DeprecatedSinceKotlin annotation can be used only together with Deprecated annotation" + "DeprecatedSinceKotlin annotation can only be used together with Deprecated annotation" ) map.put( DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL, - "DeprecatedSinceKotlin annotation can be used only with unspecified deprecation level of Deprecated annotation" + "DeprecatedSinceKotlin annotation can only be used with an unspecified deprecation level of Deprecated annotation" ) map.put( DEPRECATED_SINCE_KOTLIN_OUTSIDE_KOTLIN_SUBPACKAGE, @@ -855,26 +855,26 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( OVERRIDE_DEPRECATION, - "This declaration overrides deprecated member but not marked as deprecated itself. Please add @Deprecated annotation or suppress", + "This declaration overrides a deprecated member but is not marked as deprecated itself. Please add the @Deprecated annotation or suppress", EMPTY, EMPTY ) map.put(ANNOTATION_ON_SUPERCLASS, "Annotations on superclass are meaningless") map.put(RESTRICTED_RETENTION_FOR_EXPRESSION_ANNOTATION, "Expression annotations with retention other than SOURCE are prohibited") map.put(WRONG_ANNOTATION_TARGET, "This annotation is not applicable to target ''{0}''", TO_STRING) - map.put(INAPPLICABLE_TARGET_ON_PROPERTY, "''@{0}:'' annotations could be applied only to property declarations", TO_STRING) + map.put(INAPPLICABLE_TARGET_ON_PROPERTY, "''@{0}:'' annotations can only be applied to property declarations", TO_STRING) map.put( INAPPLICABLE_TARGET_ON_PROPERTY_WARNING, - "''@{0}:'' annotations could be applied only to property declarations. It will be an error in a future release. See https://youtrack.jetbrains.com/issue/KT-15470", + "''@{0}:'' annotations can only be applied to property declarations. It will be an error in a future release. See https://youtrack.jetbrains.com/issue/KT-15470", TO_STRING ) - map.put(INAPPLICABLE_TARGET_PROPERTY_IMMUTABLE, "''@{0}:'' annotations could be applied only to mutable properties", TO_STRING) - map.put(INAPPLICABLE_TARGET_PROPERTY_HAS_NO_DELEGATE, "'@delegate:' annotations could be applied only to delegated properties") + map.put(INAPPLICABLE_TARGET_PROPERTY_IMMUTABLE, "''@{0}:'' annotations can only be applied to mutable properties", TO_STRING) + map.put(INAPPLICABLE_TARGET_PROPERTY_HAS_NO_DELEGATE, "'@delegate:' annotations can only be applied to delegated properties") map.put( INAPPLICABLE_TARGET_PROPERTY_HAS_NO_BACKING_FIELD, - "'@field:' annotations could be applied only to properties with backing fields" + "'@field:' annotations can only be applied to properties with backing fields" ) - map.put(INAPPLICABLE_PARAM_TARGET, "'@param:' annotations could be applied only to primary constructor parameters") + map.put(INAPPLICABLE_PARAM_TARGET, "'@param:' annotations can only be applied to primary constructor parameters") map.put(REDUNDANT_ANNOTATION_TARGET, "Redundant annotation target ''{0}''", TO_STRING) map.put(INAPPLICABLE_FILE_TARGET, "'@file:' annotations can only be applied before package declaration") map.put( @@ -885,7 +885,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put(REPEATED_ANNOTATION, "This annotation is not repeatable") map.put(REPEATED_ANNOTATION_WARNING, "This annotation is not repeatable") - map.put(NON_INTERNAL_PUBLISHED_API, "@PublishedApi annotation is only applicable for internal declaration") + map.put(NON_INTERNAL_PUBLISHED_API, "@PublishedApi annotation is only applicable to internal declaration") // OptIn map.put(OPT_IN_USAGE, "{1}", TO_STRING, STRING) @@ -941,13 +941,13 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( PLUGIN_ANNOTATION_AMBIGUITY, - "Resolution of annotation type is ambiguous between {1} and plugin annotation {0}. Please specify fully qualified name of annotation", + "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 ) map.put( AMBIGUOUS_ANNOTATION_ARGUMENT, - "Resolution of annotation argument is ambiguous between {0}. Please specify fully qualified name of argument", + "Resolution of the annotation argument is ambiguous between {0}. Please use a fully qualified name as argument", SYMBOLS, ) @@ -981,7 +981,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) // Modifiers - map.put(INAPPLICABLE_INFIX_MODIFIER, "''infix'' modifier is inapplicable on this function") + map.put(INAPPLICABLE_INFIX_MODIFIER, "''infix'' modifier is inapplicable to this function") map.put(REPEATED_MODIFIER, "Repeated ''{0}''", TO_STRING) map.put(REDUNDANT_MODIFIER, "Modifier ''{0}'' is redundant because ''{1}'' is present", TO_STRING, TO_STRING) map.put(DEPRECATED_MODIFIER, "Modifier ''{0}'' is deprecated, use ''{1}'' instead", TO_STRING, TO_STRING) @@ -1097,7 +1097,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(NEXT_MISSING, "Method ''next()'' cannot be called on ''iterator()''") map.put(NEXT_AMBIGUITY, "Method ''next()'' is ambiguous for this expression: {0}", SYMBOLS) - map.put(AMBIGUOUS_FUNCTION_TYPE_KIND, "Multiple functional type conversions are not allowed for single type. Detected type conversions: {0}", FUNCTIONAL_TYPE_KINDS) + 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) @@ -1108,7 +1108,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( AMBIGUOUS_CALL_WITH_IMPLICIT_CONTEXT_RECEIVER, - "With implicit context receiver, call is ambiguous. Specify the receiver explicitly" + "With implicit context receivers, the call is ambiguous. Please specify the receiver explicitly" ) map.put( UNSUPPORTED_CONTEXTUAL_DECLARATION_CALL, @@ -1156,7 +1156,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( OUTER_CLASS_ARGUMENTS_REQUIRED, - "Type arguments should be specified for an outer {0}. Use full class name to specify them", + "Type arguments should be specified for an outer {0}. Use the full class name to specify them", RENDER_CLASS_OR_OBJECT_NAME ) map.put(TYPE_PARAMETERS_IN_OBJECT, "Type parameters are not allowed for objects") @@ -1262,7 +1262,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER, "Type parameter of a property must be used in its receiver type") - map.put(NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY, "A 'return' expression required in a function with a block body ('{...}')") + map.put(NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY, "A 'return' expression is required in a function with a block body ('{...}')") map.put( RETURN_TYPE_MISMATCH, @@ -1300,7 +1300,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(CALLABLE_REFERENCE_LHS_NOT_A_CLASS, "Left-hand side of a callable reference cannot be a type parameter") map.put(CALLABLE_REFERENCE_TO_ANNOTATION_CONSTRUCTOR, "Annotation class cannot be instantiated") - map.put(CLASS_LITERAL_LHS_NOT_A_CLASS, "Only classes are allowed on the left hand side of a class literal") + map.put(CLASS_LITERAL_LHS_NOT_A_CLASS, "Only classes are allowed on the left-hand side of a class literal") map.put(NULLABLE_TYPE_IN_CLASS_LITERAL_LHS, "Type in a class literal must not be nullable") map.put( EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS, @@ -1310,7 +1310,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { // Value classes map.put(VALUE_CLASS_NOT_TOP_LEVEL, "Value class cannot be local or inner") - map.put(VALUE_CLASS_NOT_FINAL, "Value class can be only final") + map.put(VALUE_CLASS_NOT_FINAL, "Value class can only be final") map.put(ABSENCE_OF_PRIMARY_CONSTRUCTOR_FOR_VALUE_CLASS, "Primary constructor is required for value class") map.put(INLINE_CLASS_CONSTRUCTOR_WRONG_PARAMETERS_SIZE, "Inline class must have exactly one primary constructor parameter") map.put(VALUE_CLASS_EMPTY_CONSTRUCTOR, "Value class must have at least one primary constructor parameter") @@ -1336,10 +1336,10 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( SECONDARY_CONSTRUCTOR_WITH_BODY_INSIDE_VALUE_CLASS, - "Secondary constructors with bodies are reserved for for future releases" + "Secondary constructors with bodies are reserved for future releases" ) map.put(RESERVED_MEMBER_INSIDE_VALUE_CLASS, "Member with the name ''{0}'' is reserved for future releases", TO_STRING) - map.put(TYPE_ARGUMENT_ON_TYPED_VALUE_CLASS_EQUALS, "Type arguments for typed value class equals must be only star projections") + map.put(TYPE_ARGUMENT_ON_TYPED_VALUE_CLASS_EQUALS, "Type arguments for typed value class equals must all be star projections") map.put(INNER_CLASS_INSIDE_VALUE_CLASS, "Value class cannot have inner classes") map.put(VALUE_CLASS_CANNOT_BE_CLONEABLE, "Value class cannot be Cloneable") map.put( @@ -1431,7 +1431,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( VAR_TYPE_MISMATCH_ON_OVERRIDE, - "Type of ''{0}'' doesn''t match the type of the overridden var-property ''{1}''", + "Type of ''{0}'' doesn't match the type of the overridden var-property ''{1}''", DECLARATION_NAME, SYMBOL ) @@ -1530,12 +1530,12 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { // Invalid local declarations map.put( LOCAL_OBJECT_NOT_ALLOWED, - "Named object ''{0}'' is a singleton and cannot be local. Try to use anonymous object instead", + "Named object ''{0}'' is a singleton and cannot be local. Try to use an anonymous object instead", TO_STRING ) // + map.put( LOCAL_INTERFACE_NOT_ALLOWED, - "''{0}'' is an interface so it cannot be local. Try to use anonymous object or abstract class instead", + "''{0}'' is an interface, so it cannot be local. Try to use an anonymous object or abstract class instead", TO_STRING ) @@ -1563,8 +1563,8 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { "Fun interface must have exactly one abstract function" ) map.put(FUN_INTERFACE_CANNOT_HAVE_ABSTRACT_PROPERTIES, "Fun interface can not have abstract properties") - map.put(FUN_INTERFACE_ABSTRACT_METHOD_WITH_TYPE_PARAMETERS, "Fun interface can not have abstract metod with type parameters") - map.put(FUN_INTERFACE_ABSTRACT_METHOD_WITH_DEFAULT_VALUE, "Fun interface abstract method can not have default value") + map.put(FUN_INTERFACE_ABSTRACT_METHOD_WITH_TYPE_PARAMETERS, "Fun interface can not have abstract method with type parameters") + map.put(FUN_INTERFACE_ABSTRACT_METHOD_WITH_DEFAULT_VALUE, "Fun interface abstract method can not have a default value") 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") @@ -1626,7 +1626,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( DELEGATE_USES_EXTENSION_PROPERTY_TYPE_PARAMETER, - "It''s forbidden using extension property type parameter ''{0}'' in delegate. See https://youtrack.jetbrains.com/issue/KT-24643", + "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) @@ -1669,11 +1669,11 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( PROPERTY_MUST_HAVE_GETTER, - "This property needs a custom getter, because it's type is not a supertype of the backing field's type" + "This property needs a custom getter, because its type is not a supertype of the backing field's type" ) map.put( PROPERTY_MUST_HAVE_SETTER, - "This property needs a custom setter, because it's type is not a subtype of the backing field's type" + "This property needs a custom setter, because its type is not a subtype of the backing field's type" ) map.put( EXPLICIT_BACKING_FIELD_IN_INTERFACE, @@ -1689,7 +1689,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( REDUNDANT_EXPLICIT_BACKING_FIELD, - "There's no need in an explicit backing field declaration if it has the same type as the property" + "There's no need for an explicit backing field declaration if it has the same type as the property" ) map.put(ABSTRACT_PROPERTY_IN_PRIMARY_CONSTRUCTOR_PARAMETERS, "This property cannot be declared abstract") map.put(LOCAL_VARIABLE_WITH_TYPE_PARAMETERS_WARNING, "Type parameters for local variables are deprecated") @@ -1703,7 +1703,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(LOCAL_EXTENSION_PROPERTY, "Local extension properties are not allowed") - map.put(CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT, "Const 'val' are only allowed on top level, in named objects, or in companion objects") + map.put(CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT, "Const 'val' is only allowed on top level, in named objects, or in companion objects") map.put(CONST_VAL_WITH_GETTER, "Const 'val' should not have a getter") map.put(CONST_VAL_WITH_DELEGATE, "Const 'val' should not have a delegate") map.put(TYPE_CANT_BE_USED_FOR_CONST_VAL, "Const ''val'' has type ''{0}''. Only primitives and String are allowed", RENDER_TYPE) @@ -1871,7 +1871,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { SAFE_CALL_WILL_CHANGE_NULLABILITY, """ |Safe call on a non-null receiver will have nullable type in future releases - | Right now safe call on non nullable receiver has not null type: SomeType + | Right now safe call on non-nullable receiver has not null type: SomeType | In future releases all safe calls will have nullable type: SomeType?""".trimMargin() ) map.put(UNEXPECTED_SAFE_CALL, "Safe-call is not allowed here") @@ -1893,7 +1893,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(INVALID_IF_AS_EXPRESSION, "'if' must have both main and 'else' branches if used as an expression") map.put( NON_EXHAUSTIVE_WHEN_STATEMENT, - "Non exhaustive ''when'' statements on {0} will be prohibited in 1.7, add {1}", + "Non-exhaustive ''when'' statements on {0} will be prohibited in 1.7, add {1}", TO_STRING, WHEN_MISSING_CASES ) @@ -1917,7 +1917,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(TYPE_PARAMETER_IS_NOT_AN_EXPRESSION, "Type parameter ''{0}'' is not an expression", SYMBOL) map.put( TYPE_PARAMETER_ON_LHS_OF_DOT, - "Type parameter ''{0}'' cannot have or inherit a companion object, so it cannot be on the left hand side of dot", + "Type parameter ''{0}'' cannot have or inherit a companion object, so it cannot be on the left-hand side of dot", SYMBOL ) map.put( @@ -1966,7 +1966,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { ) map.put( UNDERSCORE_USAGE_WITHOUT_BACKTICKS, - "Names _, __, ___, ... can be used only in back-ticks (`_`, `__`, `___`, ...)" + "Names _, __, ___, ... can only be used in back-ticks (`_`, `__`, `___`, ...)" ) map.put( RESOLVED_TO_UNDERSCORE_NAMED_CATCH_PARAMETER, @@ -2090,7 +2090,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(SUPER_CALL_FROM_PUBLIC_INLINE, "Accessing super members from public-API inline function is deprecated", SYMBOL) - map.put(ILLEGAL_INLINE_PARAMETER_MODIFIER, "Modifier is allowed only for function parameters of an inline function") + map.put(ILLEGAL_INLINE_PARAMETER_MODIFIER, "Modifier is only allowed for function parameters of an inline function") map.put( INLINE_SUSPEND_FUNCTION_TYPE_UNSUPPORTED, @@ -2117,7 +2117,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put(PACKAGE_CANNOT_BE_IMPORTED, "Packages cannot be imported") map.put( CANNOT_BE_IMPORTED, - "Cannot import ''{0}'', functions and properties can be imported only from packages or objects", + "Cannot import ''{0}'', functions and properties can only be imported from packages or objects", TO_STRING ) map.put( @@ -2130,15 +2130,15 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() { // Suspend map.put( ILLEGAL_SUSPEND_FUNCTION_CALL, - "Suspend function ''{0}'' should be called only from a coroutine or another suspend function", + "Suspend function ''{0}'' should only be called from a coroutine or another suspend function", SYMBOL ) map.put( ILLEGAL_SUSPEND_PROPERTY_ACCESS, - "Suspend property ''{0}'' should be accessed only from a coroutine or suspend function", + "Suspend property ''{0}'' should only be accessed from a coroutine or suspend function", SYMBOL ) - map.put(NON_LOCAL_SUSPENSION_POINT, "Suspension functions can be called only within coroutine body") + map.put(NON_LOCAL_SUSPENSION_POINT, "Suspension functions can only be called within coroutine body") map.put( ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL, "Restricted suspending functions can only invoke member or extension suspending functions on their restricted coroutine scope"