digitalmars.D.bugs - [Issue 13142] New: Enums on different classes confuse the compiler
- via Digitalmars-d-bugs (42/42) Jul 16 2014 https://issues.dlang.org/show_bug.cgi?id=13142
https://issues.dlang.org/show_bug.cgi?id=13142 Issue ID: 13142 Summary: Enums on different classes confuse the compiler Product: D Version: unspecified Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: mingodad gmail.com Trying to compile Harmonia with dmd 2.065 I discovered a bug that was not present on previous versions. Sample program to show the bug: ------ class Button { enum TYPE // button type { COMMAND, CHECK, OPTION, } } class Toolbar { enum ButtonTYPE // button type { COMMAND = Button.TYPE.COMMAND, CHECK = Button.TYPE.CHECK, OPTION = Button.TYPE.OPTION, DELIMETER = Button.TYPE.max + 1 } } void main(){} ------ dmd 2.065 : bugEnum.d(4): Error: cannot implicitly convert expression (3) of type int to TYPE LDC - the LLVM D compiler (0.13.0) based on DMD 2.064: The same error. gdc 4.9: The same error. gdc 4.8.1 : Compiles without error. --
Jul 16 2014