Thread overview | |||||
---|---|---|---|---|---|
|
July 27, 2014 [Issue 13214] array.opSlice one element falsy empty | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13214 --- Comment #1 from Robert Schadek <rburners@gmail.com> --- empty is wrong: it should be _a > _b but that crashed a bunch of other programs -- |
July 27, 2014 [Issue 13214] array.opSlice one element falsy empty | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13214 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg@gmx.com --- Comment #2 from Jonathan M Davis <jmdavisProg@gmx.com> --- ??? Of course a[1 .. 1] is empty. It's just like a[0 .. 0] or a[$ .. $]. If you want one element starting at index 1, then you need to do a[1 .. 2]. So, if the problem is that you think that a[1 .. 1] is supposed to be a range of length 1, starting at index 1, then you misunderstand how slice indices work. (In reply to Robert Schadek from comment #1) > empty is wrong: > > it should be _a > _b but that crashed a bunch of other programs And this comment makes no sense to me. There is no _a or _b in this example, so I don't know what you're trying to say. -- |
July 27, 2014 [Issue 13214] array.opSlice one element falsy empty | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13214 Robert Schadek <rburners@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Robert Schadek <rburners@gmail.com> --- You're right i shouldn't think it is a bug after 1am this can be closed -- |
Copyright © 1999-2021 by the D Language Foundation