Skip to content

Advance ConcatIterator.last#8549

Merged
lrytz merged 3 commits intoscala:2.13.xfrom
som-snytt:issue/t11807
Dec 2, 2019
Merged

Advance ConcatIterator.last#8549
lrytz merged 3 commits intoscala:2.13.xfrom
som-snytt:issue/t11807

Conversation

@som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Nov 23, 2019

The last of the concat chain advances
when the tail is consumed and last is the tailhead;
and when the current ConcatIterator is lifted
and its tail assumed, maybe also assume its last.

Fixes scala/bug#11807

The `last` of the concat chain advances
when the tail is consumed and last is the tailhead;
and when the current ConcatIterator is lifted
and its tail assumed, maybe also assume its last.
@scala-jenkins scala-jenkins added this to the 2.13.2 milestone Nov 23, 2019
@SethTisue
Copy link
Member

target 2.12.x?

@ennru
Copy link
Contributor

ennru commented Nov 23, 2019

target 2.12.x?

Seen in #8550. Thank you!

@lrytz lrytz requested a review from szeiger November 25, 2019 08:44
@diesalbla diesalbla added the library:collections PRs involving changes to the standard collection library label Nov 25, 2019
Copy link
Contributor

@szeiger szeiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With all the code getting moved around it's hard to see the actual difference but the one I spotted looks reasonable and the tests confirm that it works.

@som-snytt
Copy link
Contributor Author

The backport has only the second commit, which is the functional fix.

@lrytz lrytz merged commit cf14429 into scala:2.13.x Dec 2, 2019
@som-snytt som-snytt deleted the issue/t11807 branch December 2, 2019 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

library:collections PRs involving changes to the standard collection library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConcatIterator can lose its tail after merging another ConcatIterator

8 participants