Back to Intellij Community

FromClosedRangeMigration

plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/FromClosedRangeMigration.html

2025.3-rc-2429 B
Original Source

Reports IntProgression.fromClosedRange() and LongProgression.fromClosedRange() with MIN_VALUE step.

It is prohibited to call IntProgression.fromClosedRange() and LongProgression.fromClosedRange() with MIN_VALUE step. All such calls should be checked during migration to Kotlin 1.3+.

Example:

IntProgression.fromClosedRange(12, 143, Int.MIN_VALUE)

To fix the problem change the step of the progression.