[Issue 13802] New: Improve pretty-print result for the const(string) type
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Dec 1 06:39:00 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13802
Issue ID: 13802
Summary: Improve pretty-print result for the const(string) type
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: diagnostic
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
Compiler knows the name 'string' as an alias of immutable(char)[] type.
string s;
char[] a = s;
--------
Error: cannot implicitly convert expression (s) of type string to char[]
But, if the 'string' type is qualified, the diagnostic message will be
difficult to read.
const(string) cs;
char[] a = cs;
--------
Error: cannot implicitly convert expression (cs) of type
const(immutable(char)[]) to char[]
I think it should be improved to:
Error: cannot implicitly convert expression (cs) of type const(string) to
char[]
--
More information about the Digitalmars-d-bugs
mailing list