Bug 12911 – `std.array.array` doesn't work for non-mutable classes

Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-13T09:44:00Z
Last change time
2014-06-21T08:35:43Z
Keywords
rejects-valid
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2014-06-13T09:44:15Z
It was an old problem, than it was fixed, currently `emplaceRef` breaks it again: --- import std.array; void main() { const Object[] arr; arr.array(); } --- ...\src\phobos\std\conv.d(3914): Error: cannot implicitly convert expression (arg) of type const(Object) to object.Object ...\src\phobos\std\array.d(54): Error: template instance std.conv.emplaceRef!(const(Object)).emplaceRef!(const(Object)) error instantiating main.d(6): instantiated from here: array!(const(Object)[]) ---
Comment #1 by bugzilla — 2014-06-20T20:55:35Z
This doesn't work in 2.063, 2.064, or 2.065. Which version did it work on?
Comment #2 by k.hara.pg — 2014-06-21T08:35:43Z
(In reply to Walter Bright from comment #1) > This doesn't work in 2.063, 2.064, or 2.065. > > Which version did it work on? At least the code does not work from 2.060. I'd close this issue until be presented with the actual version that ever worked.