Inspectopedia
 
2025.2

MIN_VALUE step in fromClosedRange() since 1.3

Info
Last modified: Last modified: 18 September 2025

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:

To fix the problem change the step of the progression.