"Convert to range check" inspection: apply ReplaceRangeToWithUntilInspection after convertion
#KT-33880 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
54df0aad16
commit
82f75c707e
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(bar: Int, min: Int, max: Int) {
|
||||
min < bar && bar < max<caret>
|
||||
}
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo(bar: Int, min: Int, max: Int) {
|
||||
bar in (min + 1)..(max - 1)
|
||||
bar in (min + 1) until max
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
val N = 42
|
||||
fun test(a: Int) = a >= 0 && a < N<caret>
|
||||
@@ -0,0 +1,3 @@
|
||||
// WITH_RUNTIME
|
||||
val N = 42
|
||||
fun test(a: Int) = a in 0 until N
|
||||
Reference in New Issue
Block a user