[Issue 21311] New: Enum super type comparison treated as different types.
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Oct 15 02:18:41 UTC 2020
    
    
  
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 at puremagic.com
          Reporter: jonathanilevi at 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.
--
    
    
More information about the Digitalmars-d-bugs
mailing list