Bug 12771 – opIndex on static arrays in a Variant is not implemented.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-05-20T05:39:00Z
Last change time
2014-06-06T08:35:00Z
Keywords
pull
Assigned to
opantm2+dbugs
Creator
opantm2+dbugs

Comments

Comment #0 by opantm2+dbugs — 2014-05-20T05:39:32Z
Currently OpID.index always performs an assert(0) if a static array is stored. Sample: import std.variant; void main() { Variant v = cast(int[4])[0, 1, 2, 3]; auto a = v[2]; }
Comment #1 by opantm2+dbugs — 2014-05-20T06:06:18Z
Comment #2 by github-bugzilla — 2014-06-06T08:35:00Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/837847319911ea31cbc08a06561af370c732158e Fix issue 12771 - Variant opIndex for static arrays is not implemented. https://github.com/D-Programming-Language/phobos/commit/d3fa054a9c43afe7878a736d86e8ae1233d1ef50 Merge pull request #2188 from Kapps/fix12771 Fix issue 12771 - Variant opIndex for static arrays is not implemented.