[Issue 3934] Some untidy attributes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 19 06:50:34 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=3934



--- Comment #19 from bearophile_hugs at eml.cc 2011-03-19 06:47:16 PDT ---
It seems "emum" implies "static":


enum X = 10;
void main() {
    enum int X = 20;
    static int foo() {
        return X; // No errors
    }
    assert(foo() == 20); // No errors
}


Yet this compiles:

void main() {
    enum static int x = 1;
}


While this:

void main() {
    static static int x = 1;
}

Produces the error:
test.d(2): redundant storage class 'static'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list