summaryrefslogtreecommitdiff
path: root/test/files/run/t4658.scala
Commit message (Collapse)AuthorAgeFilesLines
* Make NumericRange# O(1) instead of O(n).Simon Ochsenreither2012-04-061-11/+3
| | | | | | | | | | | | | 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.
* Makes Range#sum an O(1) operation instead of an O(n) one.Simon Ochsenreither2011-12-021-0/+41
Partially fixes SI-4658. NumericRange stays slow, thanks to the brilliant idea that Numeric doesn't need a division operation.