Comment #0 by bearophile_hugs — 2013-04-02T09:54:52Z
void main() {
dchar c = 'A';
dstring s0 = "bcd"; // OK
auto s1 = c ~ s0; // OK
auto s2 = c ~ "bcd"; // Error, bad.
string s3 = "bcd";
auto s4 = c ~ s3; // Error, good.
}
dmd 2.063alpha gives:
temp.d(5): Error: incompatible types for ((c) ~ ("bcd")): 'dchar' and 'string'
temp.d(7): Error: incompatible types for ((c) ~ (s3)): 'dchar' and 'string'
The line of s4 is an expected error. But I think the error with s2 should not happen.
Comment #1 by robert.schadek — 2024-12-13T18:05:48Z