August 24, 2015
https://issues.dlang.org/show_bug.cgi?id=14957

          Issue ID: 14957
           Summary: order of declaration at global scope
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: john.loughran.colvin@gmail.com

enum A = 1;
enum B = C; //Error
static if(A)
    enum C = 0;
enum D = C; //OK

--