Programming Search⌘K

Kotlin errors and diagnostics, page 4 of 5

The error codes and warnings of Kotlin, with the message that each one prints and what causes it. This page has 952 cards.

This 'copy' usage exposes the non-public primary constructor of a 'data class'. The 'copy' will change its visibility in future versions of Kotlin. The public-API inline … will not be able to access non-public-API 'copy'. See https://youtrack.jetbrains.com/issue/KT-11914. NON_PUBLIC_DATA_COPY_CALL_FROM_PUBLIC_INLINE

The compiler reports it as a warning, and as an error when the language feature that the deprecation names is turned on.

Code
NON_PUBLIC_DATA_COPY_CALL_FROM_PUBLIC_INLINE
Severity
warning
Message
This 'copy' usage exposes the non-public primary constructor of a 'data class'. The 'copy' will change its visibility in future versions of Kotlin. The public-API inline {} will not be able to access non-public-API 'copy'. See https://youtrack.jetbrains.com/issue/KT-11914

Source: github.com. JSON record. This entry is a card. Help write this page.

Method '…' is located in a scope marked as '@MustUseReturnValues', but marked as '@IgnorableReturnValue' in parent type '…' or its supertypes. Overriding ignorable methods with must-use methods is a semantically incorrect change. Consider marking '…' as '@IgnorableReturnValue'. OVERRIDING_IGNORABLE_WITH_MUST_USE

Code
OVERRIDING_IGNORABLE_WITH_MUST_USE
Severity
warning
Message
Method '{}' is located in a scope marked as '@MustUseReturnValues', but marked as '@IgnorableReturnValue' in parent type '{}' or its supertypes. Overriding ignorable methods with must-use methods is a semantically incorrect change. Consider marking '{}' as '@IgnorableReturnValue'.

Source: github.com. JSON record. This entry is a card. Help write this page.

Returns are prohibited in functions with expression body and without explicit return type. Use block body '{...}' or add an explicit return type. RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY_AND_IMPLICIT_TYPE

Code
RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY_AND_IMPLICIT_TYPE
Severity
error
Message
Returns are prohibited in functions with expression body and without explicit return type. Use block body '{...}' or add an explicit return type.

Source: github.com. JSON record. This entry is a card. Help write this page.

'$ROOT_PREFIX_FOR_IDE_RESOLUTION_MODE' cannot be used in source code. It's an implementation detail of IntelliJ IDEA's Kotlin language support. In most cases it can be removed without changing behavior. If you notice IntelliJ IDEA adding '$ROOT_PREFIX_FOR_IDE_RESOLUTION_MODE' to source code, please report an issue to https://kotl.in/plugin-issue. ROOT_IDE_PACKAGE_DEPRECATED

Code
ROOT_IDE_PACKAGE_DEPRECATED
Severity
warning
Message
'$ROOT_PREFIX_FOR_IDE_RESOLUTION_MODE' cannot be used in source code. It's an implementation detail of IntelliJ IDEA's Kotlin language support. In most cases it can be removed without changing behavior. If you notice IntelliJ IDEA adding '$ROOT_PREFIX_FOR_IDE_RESOLUTION_MODE' to source code, please report an issue to https://kotl.in/plugin-issue.

Source: github.com. JSON record. This entry is a card. Help write this page.