Inspectopedia Help

MIN_VALUE step in fromClosedRange() since 1.3

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.

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.

FromClosedRangeMigration
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.

Settings or Preferences | Editor | Inspections | Kotlin | Migration

Availability

By default bundled with

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin

Kotlin, 241.18072-IJ

Last modified: 18 June 2024