[Issue 24151] New: std.container.array: Array!string("") does not compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 19 20:15:22 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24151
Issue ID: 24151
Summary: std.container.array: Array!string("") does not compile
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: nick at geany.org
import std.container.array;
auto a = Array!string("test");
stdarr.d(4): Error: none of the overloads of template
`std.container.array.Array!string.Array.__ctor` are callable using argument
types `!()(string)`
/usr/include/dmd/phobos/std/container/array.d(570): Candidates are:
`__ctor(U)(U[] values...)`
with `U = immutable(char)`
must satisfy the following constraint:
` isImplicitlyConvertible!(U, T)`
/usr/include/dmd/phobos/std/container/array.d(600):
`__ctor(Range)(Range r)`
with `Range = string`
must satisfy the following constraint:
` isImplicitlyConvertible!(ElementType!Range, T)`
See: https://forum.dlang.org/post/dndovpefsjjfvkzyztoz@forum.dlang.org
PR incoming.
--
More information about the Digitalmars-d-bugs
mailing list