Inspectopedia
 
2024.3

MIN_VALUE step in fromClosedRange() since 1.3

Info
New
Last modified: 03 December 2024

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.