> // Reply.d
> import CodeEnum;
>
> unittest
> {
>         auto.e = CodeEnum.OK; // Error: undefined identifier 'OK'
> }
>
>
> What I am doing wrong?

The module and your enum have the same name. When the compiler sees
the `CodeEnum` symbol, it considers you're referring to the module.
This module does not have an `OK` member, hence the error.

In D, do not use the same symbol for a module and one of its inner symbols.

Reply via email to