[Issue 19257] New: std.array.join does not handle const fields that cannot be converted to mutable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 21 09:43:27 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19257
Issue ID: 19257
Summary: std.array.join does not handle const fields that
cannot be converted to mutable
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
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.
--
More information about the Digitalmars-d-bugs
mailing list