Bug 5035 – Schrödinger's Stride

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-10-10T14:27:00Z
Last change time
2010-10-12T17:18:25Z
Assigned to
nobody
Creator
tomeksowi

Comments

Comment #0 by tomeksowi — 2010-10-10T14:27:23Z
Currently the contents of Stride depend on from which end we look at it: auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m, 4); assert(equal(col, [1, 1, 1])); assert(equal(retro(col), [4, 4, 4])); the quantum behavior is to be fixed.
Comment #1 by tomeksowi — 2010-10-10T15:04:46Z
Please also see to that this passes: auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns auto col = stride(m[1..$], 4); assert(equal(col, [2, 2, 2])); assert(equal(retro(col), [2, 2, 2])); // now explodes
Comment #2 by dsimcha — 2010-10-12T17:18:25Z