[Issue 7402] New: Appending enum string causes type change?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 30 15:17:02 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7402
Summary: Appending enum string causes type change?
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: justin at economicmodeling.com
--- Comment #0 from Justin Whear <justin at economicmodeling.com> 2012-01-30 15:17:00 PST ---
This program:
enum TEST = "test";
string valid = "this is a " ~ TEST;
char[] sabotage = cast( char[] )"this is a " ~ TEST;
string no_longer_valid = "this is a " ~ TEST;
void main() {}
Fails to compile with this error:
Error: cannot implicitly convert expression ("this is a test") of type char[]
to string
Commenting out the "char[] sabotage..." allows the program to compile.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list