Unable to understand this compiler error

bearophile bearophileHUGS at lycos.com
Wed Oct 10 08:51:56 PDT 2012


Lubos Pintes:

> I see no "void" there, except that foo has a return type of 
> void.

Minimized:

enum Foo : void* {
     a = null
}
void main() {
     auto f = Foo.a;
}


enums are good for ints, ubytes, longs, chars, etc. The more 
types you try to put in them, the more compiler holes you will 
find.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list