https://issues.dlang.org/show_bug.cgi?id=14752
Issue ID: 14752
Summary: Implicit conversion fail for array concatenation
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Consider:
void main() {
char[] x;
string s = "abc" ~ x;
}
which fails to compile with:
Error: cannot implicitly convert expression ("abc" ~ x) of type char[] to
string
This should work, because the ~ operator produces a unique allocated string.
--