[Issue 14998] Cannot put a char into a char[]
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Dec 1 08:38:15 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14998
--- Comment #5 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to schneider.cedric from comment #4)
> If the error message had read "Cannot put a char into a char[] because it is
> a range of dchar" this issue would not exist.
>
> So, proper resolution of this issue would be improving the error message
It would need to be a special case, because the error message text is
generically produced from the type names.
I somewhat disagree that a better error message would dissuade someone from
believing it should be possible. Common sense ("of course I can put a char
inside a char[]! Watch this: buf[0] = 'c';") trumps the best worded error
messages.
--
More information about the Digitalmars-d-bugs
mailing list