Bug 1365 – wchar/dchar in foreach causes CTFE to fail
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-07-23T05:27:00Z
Last change time
2014-02-16T15:21:57Z
Assigned to
bugzilla
Creator
samukha
Comments
Comment #0 by samukha — 2007-07-23T05:27:29Z
Is it supposed to work? If not, the specs should be put in sync.
char[] foo()
{
char[] s = "a string";
foreach (dchar c; s)
{
}
return "";
}
void main(char[][] args)
{
static x = foo();
}