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.
Comment #1 by clugdbug — 2009-10-13T09:12:18Z
Already patched.
*** This issue has been marked as a duplicate of issue 3190 ***