[Issue 19605] New: enum X: "Error: enum X is forward referenced when looking for sizeof"
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Jan 23 02:43:51 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=19605
          Issue ID: 19605
           Summary: enum X: "Error: enum X is forward referenced when
                    looking for sizeof"
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: elpenguino+D at gmail.com
Very easy to reproduce:
```
enum X;
static assert(X.sizeof == 0);
```
Note that I'm not exactly sure what the size of this should be. My guess was 0,
but DMD 2.064 seems to manage to evaluate it to 4 despite still issuing the
same error.
--
    
    
More information about the Digitalmars-d-bugs
mailing list