Add inspection for ranges with start > endInclusive #KT-18438 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
647558c98a
commit
13a2612e20
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
const val ONE = 1
|
||||
|
||||
fun foo() {
|
||||
2..1
|
||||
2.rangeTo(1)
|
||||
2..1L
|
||||
10L..-10L
|
||||
5..ONE
|
||||
10.toShort()..1.toShort()
|
||||
|
||||
//valid
|
||||
1..1
|
||||
1..10L
|
||||
1..2
|
||||
1.rangeTo(2)
|
||||
}
|
||||
Reference in New Issue
Block a user