Kotlin
Public API declaration with implicit return type
Info
New
Last modified: 03 December 2024Reports public
and protected
functions and properties that have an implicit return type. For API stability reasons, it's recommended to specify such types explicitly.
Example:
fun publicFunctionWhichAbusesTypeInference() =
otherFunctionWithNotObviousReturnType() ?: yetAnotherFunctionWithNotObviousReturnType()
After the quick-fix is applied:
fun publicFunctionWhichAbusesTypeInference(): Api =
otherFunctionWithNotObviousReturnType() ?: yetAnotherFunctionWithNotObviousReturnType()
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
PublicApiImplicitType
Here you can find the description of settings available for the Public API declaration with implicit return type inspection, and the reference of their default values.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Kotlin, 243.23126-IJ |
Thanks for your feedback!
Was this page helpful?