http://d.puremagic.com/issues/show_bug.cgi?id=3264
Summary: -O causes wrong "used before set" error when using
enum.
Product: D
Version: 2.031
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
OK when compiled normally, but when compiled with -O, generates:
interpret.d(2367): Error: variable Q used before set
--------
void bug()
{
enum int Q=0;
string [2] s = ["a", "b"];
assert(s[Q].dup=="a");
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------