Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 8061. #1019

Merged
merged 2 commits into from
Dec 24, 2012
Merged

Fix issue 8061. #1019

merged 2 commits into from
Dec 24, 2012

Conversation

quickfur
Copy link
Member

We cannot assume that RoR.save will also .save the state of its
subranges; so the only way we can correctly export a .save method in the
joined range is if we also .save its subranges as we traverse over them.

We cannot assume that RoR.save will also .save the state of its
subranges; so the only way we can correctly export a .save method in the
joined range is if we also .save its subranges as we traverse over them.
// We cannot export .save method unless we ensure subranges are not
// consumed when a .save'd copy of ourselves is iterated over. So
// we need to .save each subrange we traverse.
static if (isForwardRange!(ElementType!RoR))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd say same as the save condition:

static if (isForwardRange!RoR && isForwardRange!(ElementType!RoR))

No point in saving if joiner isn't going to propose forward range iteration anyways.

@monarchdodra
Copy link
Collaborator

Fixed as discussed in the message boards, the bug repo, and the previous pull (#987).

So LGTM on this one.

andralex added a commit that referenced this pull request Dec 24, 2012
@andralex andralex merged commit 99bece7 into dlang:master Dec 24, 2012
@andralex
Copy link
Member

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants