[Issue 6815] Char array is turned into string expression during constant folding

2014-11-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6815

hst...@quickfur.ath.cx changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||hst...@quickfur.ath.cx
 Resolution|--- |WORKSFORME

--- Comment #3 from hst...@quickfur.ath.cx ---
Tested on git HEAD, Linux/64. Neither test case produces an error now. Looks
like the bug has been fixed.

--


[Issue 6815] Char array is turned into string expression during constant folding

2012-02-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6815



--- Comment #2 from Don clugd...@yahoo.com.au 2012-02-23 02:08:29 PST ---
(In reply to comment #1)
 Probably the same issue:

Nope, completely different.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6815] Char array is turned into string expression during constant folding

2012-02-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6815


Denis verylonglogin@gmail.com changed:

   What|Removed |Added

 CC||verylonglogin@gmail.com


--- Comment #1 from Denis verylonglogin@gmail.com 2012-02-13 14:44:03 MSK 
---
Probably the same issue:
---
char[] f() {
char[] buff = new char[1];
buff[0] = 0; // works
buff.ptr[0] = 0; // works
*(buff[0]) = 0; // works
char* t = buff[0]; *t = 0;   // error
foreach(ref el; buff) el = 0; // error
return buff; 
} 

static assert(f() == \0);
---
Where `error` means: `Error: cannot cast a read-only string literal to mutable
in CTFE`

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---