scala/scala — pull request #335 by soc (2012-03-27 18:17:10+00:00)
Title: [SI-4658] Make NumericRange# O(1) instead of O(n).

It makes me a bit nervous that NumericRange[Int] will
get different wrong values in overflow situations compared
to Range due to the missing toLong though.

It could probably need some investigation if reordering the
operations can rule out wrong values, e. g. only fail when
the fold also fails.

Apart from that, it might make sense to just throw an exception
if an overflow happens instead of silent overflow.