[Issue 1375] CTFE fails for null strings and arrays
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 1 22:08:29 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1375
wbaxter at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|CTFE fails for null arrays |CTFE fails for null strings
| |and arrays
------- Comment #3 from wbaxter at gmail.com 2008-07-02 00:08 -------
Another example of probably same bug:
char[] copy(char[] x)
{
char[] ret;
foreach(c; x) {
ret ~= c;
}
return ret;
}
pragma(msg, copy(``));
Error:
test_ext.d(83): pragma msg string expected for message, not 'null'
Can work around by changing
char[] ret;
to
char[] ret = ``;
--
More information about the Digitalmars-d-bugs
mailing list