diff options
author | Paul Phillips <paulp@improving.org> | 2009-11-20 15:16:45 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-11-20 15:16:45 +0000 |
commit | f7b8e8f346fed1d8128976db959bff7001ed1d57 (patch) | |
tree | 59f18491ee87c9f33922b510f071f27013b355a6 /src/library/scala/collection/immutable/NumericRange.scala | |
parent | 99d8d53c36cb2283df9d42b25273aeba594e82b5 (diff) | |
download | scala-f7b8e8f346fed1d8128976db959bff7001ed1d57.tar.gz scala-f7b8e8f346fed1d8128976db959bff7001ed1d57.tar.bz2 scala-f7b8e8f346fed1d8128976db959bff7001ed1d57.zip |
More world-shaking deprecation work.
object, updating some @deprecated messages to give realistic
alternatives, properly resolving the semantic mismatch between List.--
and diff, its once-recommended but inequivalent alternative.
Diffstat (limited to 'src/library/scala/collection/immutable/NumericRange.scala')
-rw-r--r-- | src/library/scala/collection/immutable/NumericRange.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scala/collection/immutable/NumericRange.scala b/src/library/scala/collection/immutable/NumericRange.scala index 9c70ba3ca6..67b097e65d 100644 --- a/src/library/scala/collection/immutable/NumericRange.scala +++ b/src/library/scala/collection/immutable/NumericRange.scala @@ -25,7 +25,7 @@ import generic._ * the Int-based scala.Range should be more performant. * </p><pre> * <b>val</b> r1 = new Range(0, 100, 1) - * <b>val</b> veryBig = Math.MAX_INT.toLong + 1 + * <b>val</b> veryBig = Int.MaxValue.toLong + 1 * <b>val</b> r2 = Range.Long(veryBig, veryBig + 100, 1) * assert(r1 sameElements r2.map(_ - veryBig)) * </pre> @@ -48,9 +48,9 @@ extends IndexedSeq[T] // todo? - we could lift the length restriction by implementing a range as a sequence of // subranges and limiting the subranges to MAX_INT. There's no other way around it because // the generics we inherit assume integer-based indexing (as well they should.) - // The second condition is making sure type T can meaningfully be compared to Math.MAX_INT. - if (genericLength > fromInt(Math.MAX_INT) && (Math.MAX_INT == toInt(fromInt(Math.MAX_INT)))) - fail("Implementation restricts ranges to Math.MAX_INT elements.") + // The second condition is making sure type T can meaningfully be compared to Int.MaxValue. + if (genericLength > fromInt(Int.MaxValue) && (Int.MaxValue == toInt(fromInt(Int.MaxValue)))) + fail("Implementation restricts ranges to Int.MaxValue elements.") // inclusive/exclusiveness captured this way because we do not have any // concept of a "unit", we can't just add an epsilon to an exclusive |