[Issue 6721] New: [CTFE] Cannot get pointer to start of char[]
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 23 12:51:09 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6721
Summary: [CTFE] Cannot get pointer to start of char[]
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 2011-09-23 12:50:38 PDT ---
Tested with DMD 2.055
void main() {
enum foo={
char[] c="".dup; // works without initialization
// string c=""; // same with this
// ubyte[] c=[]; // fine
auto p = c.ptr; // error here
return 0;
}();
}
Error: CTFE error: cannot cast cast(char*)c to type char*
--
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