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