October 15, 2020 [Issue 21311] New: Enum super type comparison treated as different types. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21311 Issue ID: 21311 Summary: Enum super type comparison treated as different types. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: jonathanilevi@gmail.com Pre 2.074.1 this would compile, 2.075.1 it was marked as deprecated: ``` enum E {x} enum A {x} E.x == A.x; ``` This is good, these are not the same types... But this fails?? ``` enum E {x} enum A : E {x} E.x == A.x; ``` This succeeds ```E.x == 0;``` as does this ```(E e){}(A.x);``` as they should. -- |
Copyright © 1999-2021 by the D Language Foundation