Kotlin
Function or property has platform type
Info
New
Last modified: 03 December 2024Reports functions and properties that have a platform type.
To prevent unexpected errors, the type should be declared explicitly.
Example:
fun foo() = java.lang.String.valueOf(1)
The quick fix allows you to specify the return type:
fun foo(): String = java.lang.String.valueOf(1)
- 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.
HasPlatformType
Here you can find the description of settings available for the Function or property has platform 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?