Progression resolution change since 1.9
Reports overloaded function calls where an argument requires an explicit cast to resolve to a proper declaration. The current compiler warning (available since Kotlin 1.6.20) will become an error in Kotlin 1.8.
Progressions and ranges types (kotlin.ranges
) will start implementing the Collection
interface in Kotlin 1.9 and later. This update will cause a change in resolution for overloaded functions. For instance, in the example below, the test(1..5)
call will be resolved to test(t: Any)
in Kotlin 1.8 and earlier and to test(t: Collection<*>)
in Kotlin 1.9 and later.
The provided quick-fix captures the behaviour specific to the compiler of version 1.8 and earlier:
After the quick-fix is applied:
Inspection is available for the Kotlin language level starting from 1.6.
Locating this inspection
- 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.
CastDueToProgressionResolutionChangeMigration- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Kotlin, 243.23126-IJ |