bearophile bearophileh...@lycos.com wrote in message
news:ho8k5m$5k...@digitalmars.com...
div0:
Spec explicity says enums are convertible to their base type:
Right, but I am not sure it's a good design decision. I think requiring a
cast can be better.
I absolutely agree.
Besides, use of
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
bearophile wrote:
I'm looking for D2 rough edges. I've found that this D2 code
compiles and doesn't assert at runtime:
enum Foo { V1 = 10 }
void main() {
assert(Foo.V1 == 10);
}
But I think enums and integers are not the same type,