summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-03-20 21:47:46 +0100
committerJason Zaugg <jzaugg@gmail.com>2014-03-20 22:00:52 +0100
commit1fa46a5a9634f09e4905da2468acf5ea75d6462e (patch)
tree157c4a5bb237b59090fee56383f9ccafa85dacec /docs
parentbcf24ec9ba07408ad9e8745135cc941ac3e76289 (diff)
downloadscala-1fa46a5a9634f09e4905da2468acf5ea75d6462e.tar.gz
scala-1fa46a5a9634f09e4905da2468acf5ea75d6462e.tar.bz2
scala-1fa46a5a9634f09e4905da2468acf5ea75d6462e.zip
SI-8428 Fix regression in iterator concatenation
Regressed in e3ddb2d7, which introduced `ConcatIterator` to avoid super-linear runtime on chains of concatenated iterators. `ConcatIterator` maintains a queue of thunks for the remaining iterators. Both `next` and `hasNext` delegate to `advance`, which evaluates the thunks and discards any empty iterators from the start of the queue. The first non-empty iterator is stored in the var `current`. It also overrides `++`, and creates a new `ConcatIterator` with the given `that` as an extra element in the queue. However, it failed to copy `current` across, which led to data loss.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions