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

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.2, Qodana for JVM 2024.2,

Can be installed with plugin:

Kotlin, 242.22892-IJ

Last modified: 11 September 2024