K2: render types in quotes in diagnostic messages
This commit is contained in:
committed by
Space Team
parent
c839cd3c11
commit
9d9d7880af
+1
-1
@@ -28,4 +28,4 @@ KtErrorCallInfo:
|
||||
callableIdIfNonLocal = null)
|
||||
}
|
||||
]
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is kotlin/String but kotlin/Int was expected>
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/String' but 'kotlin/Int' was expected>
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
KtInapplicableCallCandidateInfo:
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is kotlin/Int but kotlin/Char was expected>
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int' but 'kotlin/Char' was expected>
|
||||
candidate = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = false
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
@@ -30,7 +30,7 @@ KtInapplicableCallCandidateInfo:
|
||||
isInBestCandidates = true
|
||||
|
||||
KtInapplicableCallCandidateInfo:
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is kotlin/Int but kotlin/Boolean was expected>
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int' but 'kotlin/Boolean' was expected>
|
||||
candidate = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = false
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
@@ -61,7 +61,7 @@ KtInapplicableCallCandidateInfo:
|
||||
isInBestCandidates = true
|
||||
|
||||
KtInapplicableCallCandidateInfo:
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is kotlin/Int but kotlin/String was expected>
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int' but 'kotlin/String' was expected>
|
||||
candidate = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = false
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
KtInapplicableCallCandidateInfo:
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is kotlin/Boolean but kotlin/Int was expected>
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Boolean' but 'kotlin/Int' was expected>
|
||||
candidate = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = true
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
@@ -33,7 +33,7 @@ KtInapplicableCallCandidateInfo:
|
||||
isInBestCandidates = false
|
||||
|
||||
KtInapplicableCallCandidateInfo:
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is kotlin/Boolean but kotlin/Char was expected>
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Boolean' but 'kotlin/Char' was expected>
|
||||
candidate = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = false
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
KtInapplicableCallCandidateInfo:
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is kotlin/Int but kotlin/Boolean was expected>
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int' but 'kotlin/Boolean' was expected>
|
||||
candidate = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = false
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
KtInapplicableCallCandidateInfo:
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is kotlin/Int but kotlin/String was expected>
|
||||
diagnostic = ERROR<ARGUMENT_TYPE_MISMATCH: Argument type mismatch: actual type is 'kotlin/Int' but 'kotlin/String' was expected>
|
||||
candidate = KtDelegatedConstructorCall:
|
||||
kind = SUPER_CALL
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
|
||||
+5
-5
@@ -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,
|
||||
)
|
||||
|
||||
+1
-1
@@ -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")
|
||||
|
||||
+31
-31
@@ -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
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -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<in kotlin/Int>. 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<in kotlin/Int>'. Remove the projection or replace it with '*'
|
||||
fun a8(value: Out<in Int>) {}
|
||||
^
|
||||
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 K> = In<in K>
|
||||
compiler/testData/cli/jvm/conflictingProjection.kt:19:15: error: variance annotations are only allowed for type parameters of classes and interfaces
|
||||
typealias A15<in K> = In<out K>
|
||||
^
|
||||
compiler/testData/cli/jvm/conflictingProjection.kt:19:26: error: projection is conflicting with variance of the corresponding type parameter of In<out K>. 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<out K>'. Remove the projection or replace it with '*'
|
||||
typealias A15<in K> = In<out K>
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<ERROR CLASS: Unknown return lambda parameter type> but kotlin/Int was expected
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is 'kotlin/Function0<ERROR CLASS: Unknown return lambda parameter type>' but 'kotlin/Int' was expected
|
||||
constructor(x: Int) : this({
|
||||
^
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '<this>' before the instance has been initialized
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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<kotlin/Int>' is a final type, and thus a value of the type parameter is predetermined
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
+4
-4
@@ -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<V> 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<V>' 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<V> 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<V>' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability E & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability E & Any>>' was expected
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user