https://issues.dlang.org/show_bug.cgi?id=13142

--- Comment #3 from Domingo Alvarez Duarte <[email protected]> ---
Thanks for the explanation, originally this error message appear when the
classes was on different files and the error was reporting to be on the file
with "class Button" instead of the file with "class Toolbar".

Just in case the error message problem you are trying to fix also cover this:

bugEnumButton.d(4): Error: cannot implicitly convert expression (3) of type int
to TYPE

-----bugEnumButton.d
class Button {
  enum TYPE // button type
  {
    COMMAND,
    CHECK,
    OPTION,
  }
}
-----
-----bugEnumToolbar.d
import bugEnumButton;

class Toolbar {
  enum ButtonTYPE // button type
  {
    COMMAND   = Button.TYPE.COMMAND,
    CHECK     = Button.TYPE.CHECK,
    OPTION    = Button.TYPE.OPTION,
    DELIMETER = Button.TYPE.max + 1
  }
}
-----
-----bugEnum.d
import bugEnumToolbar;

void main(){}
-----

--

Reply via email to