D-Programming-Language/dmd — pull request #1202 by AndrejMitrovic (2012-10-21 20:10:28+00:00)
Title: Fix Issue 3913 - Bad error message with wrong enum

When an identifier lookup in an enum fails DMD will automatically search for a matching identifier in the enum's base type (even if such a type wasn't written explicitly with the base type specifier syntax). E.g. `enum Foo : Class { ... }` will attempt to search **Class**'s fields for the matching identifier if searching in **Foo** fails. Another example: `enum Foo { a = 1 }` - the base type is implicitly an integer which is also looked up, hence the error message `Error: no property 'someField' for type 'int'`.

I'd argue that In most cases people make typos specifying enum members rather than enum base properties. The new code gagges all base-type property lookup errors (except min/max/init/mangleof) and instead issues a generic error with the enum name such as:

`Error: no property 'someField' for type 'En1'`