Skip to content

Conversation

monarchdodra
Copy link
Collaborator

@jmdavis
Copy link
Member

jmdavis commented May 11, 2014

This reminds me. AFAIK, we still need to get that issue with opDollar being defined for ranges with length sorted out so that we can require that $ be useable with hasSlicing. It doesn't apply to this directly, but it is related. Unfortunately, I can't remember where we were with that other than the fact that Kenji didn't want to blindly define opDollar for everything with length, because that would be bad for AAs.

@jmdavis
Copy link
Member

jmdavis commented May 11, 2014

Oh, and thanks for doing this. take and takeExactly have got to be two of the the functions that you have to be most careful with when tweaking. And when you get it wrong, the errors are incredibly nasty to sort out because of how much depends on them - especially when hasSlicing is involved. In some ways, I think that that it's a miracle that it works as well as it does.

jmdavis added a commit that referenced this pull request May 11, 2014
Fix Issue 12731 - Infinite range slices are not themselves sliceable
@jmdavis jmdavis merged commit 2fa1032 into dlang:master May 11, 2014
@John-Colvin
Copy link
Contributor

The indexing here is wrong. Quoting from my post in #4069 (which fixes the bug), the unittests should have actually tested the result, not just verified that it compiled and didn't crash.

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