http://d.puremagic.com/issues/show_bug.cgi?id=3394
Summary: enum + for loop = strange errors Product: D Version: 2.034 Platform: Other OS/Version: Windows Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha <dsim...@yahoo.com> 2009-10-13 09:10:38 PDT --- enum FOO = 2; void main() { for(uint i = 0; i < 2; i += FOO) {} } Results in a compile time error: test.d(4): Error: variable FOO used before set Marking as minor because it appears to be an extremely weird corner case bug. The only place I could reproduce it was when the enum is used in a for loop like the above. Also, changing FOO from enum to immutable resolves this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------