diff options
author | vsalvis <salvisbergvera@gmail.com> | 2015-06-03 16:36:45 +0200 |
---|---|---|
committer | vsalvis <salvisbergvera@gmail.com> | 2015-06-17 23:39:21 +0200 |
commit | 59006209a5be5afc1724e0b14a2fdde042c8953e (patch) | |
tree | 97a02dbc5a4d8cd514ab39166d2e7f08a818cb36 /src/library | |
parent | cc8f2f6695e0b5c65439466e746a5df99ab36d84 (diff) | |
download | scala-59006209a5be5afc1724e0b14a2fdde042c8953e.tar.gz scala-59006209a5be5afc1724e0b14a2fdde042c8953e.tar.bz2 scala-59006209a5be5afc1724e0b14a2fdde042c8953e.zip |
SI-8543 doc: Move TODO out of NumericRange's scaladoc
Diffstat (limited to 'src/library')
-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 f1ac161e9a..28e56a6d87 100644 --- a/src/library/scala/collection/immutable/NumericRange.scala +++ b/src/library/scala/collection/immutable/NumericRange.scala @@ -12,6 +12,9 @@ package immutable import mutable.{ Builder, ListBuffer } +// TODO: Now the specialization exists there is no clear reason to have +// separate classes for Range/NumericRange. Investigate and consolidate. + /** `NumericRange` is a more generic version of the * `Range` class which works with arbitrary types. * It must be supplied with an `Integral` implementation of the @@ -28,9 +31,6 @@ import mutable.{ Builder, ListBuffer } * assert(r1 sameElements r2.map(_ - veryBig)) * }}} * - * TODO: Now the specialization exists there is no clear reason to have - * separate classes for Range/NumericRange. Investigate and consolidate. - * * @author Paul Phillips * @version 2.8 * @define Coll `NumericRange` @@ -266,7 +266,7 @@ object NumericRange { // Numbers may be big. val one = num.one val limit = num.fromInt(Int.MaxValue) - def check(t: T): T = + def check(t: T): T = if (num.gt(t, limit)) throw new IllegalArgumentException("More than Int.MaxValue elements.") else t // If the range crosses zero, it might overflow when subtracted |