Fix deprecated Range and Progression usages in testData

This commit is contained in:
Ilya Gorbunov
2016-01-15 18:28:35 +03:00
parent d48ec7e296
commit b97e436a50
9 changed files with 17 additions and 24 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
class MyRange1() : Range<Int> {
class MyRange1() : ClosedRange<Int> {
override val start: Int
get() = 0
override val end: Int
override val endInclusive: Int
get() = 0
override fun contains(item: Int) = true
}
@@ -2,5 +2,5 @@ fun box(): String {
val l: Long = 1
val l2: Long = 2
val r = l.rangeTo(l2)
return if (r.start == l && r.end == l2) "OK" else "fail"
return if (r.start == l && r.endInclusive == l2) "OK" else "fail"
}