summaryrefslogtreecommitdiff
path: root/test/files/run/t6827.check
Commit message (Collapse)AuthorAgeFilesLines
* SI-7128 copyToArray(xs, 0, 0) should not failRex Kerr2015-01-081-6/+6
| | | | | | | | | | Fixed all copyToArray methods to do exactly what the docs say they do, with the least-suprise behavior of not throwing an exception if you ask to copy nothing (but would have copied out of range). Iterator had an undocumented requirement for the target index to be in range regardless if anything happened; this has been removed.
* Fix Iterator#copyToArray (fixes SI-6827).Erik Osheim2012-12-201-0/+15
As pointed out in #scala, when using a non-zero start it's possible to get an ArrayIndexOutOfBoundsException due to an incorrect bounds check. This patch fixes this, as well as another potential bounds error, and adds test cases. Incorporates some other suggestions by Som-Snytt to ensure that callers will get useful error messages in cases where the start parameter is wrong (negative or out-of-array-bounds). Review by @som-snytt.