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.
IntelliJ IDEA 2023.3, Qodana for JVM 2023.3