Add inspection for ranges with start > endInclusive #KT-18438 Fixed

This commit is contained in:
Kirill Rakhman
2017-06-14 00:10:21 +03:00
committed by Mikhail Glukhikh
parent 647558c98a
commit 13a2612e20
13 changed files with 261 additions and 33 deletions
+17
View File
@@ -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)
}