Summary: Cannot forward-reference to a nested enum type with
                    any attribute
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
            Blocks: 340

--- Comment #0 from 2011-05-02 11:34:03 PDT ---
Test case:

struct T {
    E e;

    public  // <-- comment this out is OK.
    enum E { x }
x.d(5): Error: enum E is forward referenced
x.d(5): Error: enum E is forward referenced

This applies to *all* kinds of attributes, like 'deprecated' or 'static' or
'@safe'. The T can be changed to any kinds of aggregates (class, interface,
union) and the bug still persists.

Moving the 'E e;' below the 'enum E' removes the error, so is not using any

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to