[Issue 11627] New: [CTFE] cannot cast dchar to char at compile time on AA assignment
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 27 17:57:40 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11627
Summary: [CTFE] cannot cast dchar to char at compile time on AA
assignment
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: CTFE, rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-11-27 17:57:37 PST ---
From:
http://forum.dlang.org/post/nvaqmtivvhrsaylzmscb@forum.dlang.org
Test case:
bool test()
{
char[ubyte] toCharTmp;
dchar letter = 'A';
//char c = cast(char)letter; // OK
toCharTmp[0] = cast(char)letter; // NG
return true;
}
void main()
{
enum ct = test();
}
Output:
test.d(7): Error: cannot cast letter to char at compile time
test.d(13): called from here: test()
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list