Files
Nikita Bobko 15ed569d36 Make "ReplaceRangeToWithUntil" suggest using rangeUntil operator
instead of `until`

Make it suggest only when it's possible (language level is 1.8 at least
and OptIn is allowed)

Tests are copied from ReplaceRangeToWithUntilInspection. (only
closedRange.kt test is changed)

^KTIJ-22372 Fixed

GitOrigin-RevId: dded3ea9395ffa9269be94c47545c18048fbe504
2022-08-02 22:07:13 +00:00

10 lines
154 B
Kotlin

// WITH_STDLIB
// PROBLEM: none
// LANGUAGE_VERSION: 1.8
@OptIn(ExperimentalStdlibApi::class)
fun foo(a: Int) {
for (i in 0..a - 2<caret>) {
}
}