Bug 19257 – std.array.join does not handle const fields that cannot be converted to mutable
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-09-21T09:43:27Z
Last change time
2018-10-02T23:06:41Z
Assigned to
No Owner
Creator
FeepingCreature
Comments
Comment #0 by default_357-line — 2018-09-21T09:43:27Z
std.array.join tries to remove constness from its arrays' fields on the premise that it's constructing a new array anyways. However, consider const(Object)[][].join: const(Object) cannot be implicitly converted to Object, so the join fails.
In that case, join should just return a const(Object)[] array.
Comment #1 by default_357-line — 2018-09-21T09:44:15Z