Drop Ranges, Progressions, ProgressionIterators for Double and Float.

Undeprecate generic Comparable.rangeTo, but return private implementation instead.
Undeprecate contains and coerceIn for generic ranges.
This commit is contained in:
Ilya Gorbunov
2015-11-06 18:22:31 +03:00
parent 4d2f9b82da
commit 6bac3e1986
54 changed files with 30 additions and 1630 deletions
@@ -52,25 +52,5 @@ fun box(): String {
return "Wrong elements for (\"ace\"[1])..(\"age\"[1]): $list5"
}
val list6 = ArrayList<Double>()
val range6 = (1.5 * 2)..(3.0 * 3.0)
for (i in range6) {
list6.add(i)
if (list6.size() > 23) break
}
if (list6 != listOf<Double>(3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)) {
return "Wrong elements for (1.5 * 2)..(3.0 * 3.0): $list6"
}
val list7 = ArrayList<Float>()
val range7 = (1.5.toFloat() * 2.toFloat())..(3.0.toFloat() * 3.0.toFloat())
for (i in range7) {
list7.add(i)
if (list7.size() > 23) break
}
if (list7 != listOf<Float>(3.0.toFloat(), 4.0.toFloat(), 5.0.toFloat(), 6.0.toFloat(), 7.0.toFloat(), 8.0.toFloat(), 9.0.toFloat())) {
return "Wrong elements for (1.5.toFloat() * 2.toFloat())..(3.0.toFloat() * 3.0.toFloat()): $list7"
}
return "OK"
}