http://d.puremagic.com/issues/show_bug.cgi?id=5981

           Summary: Can't used post defined constant at compile-time
           Product: D
           Version: future
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: jesse.k.phillip...@gmail.com
                CC: jesse.k.phillip...@gmail.com


--- Comment #0 from Jesse Phillips <jesse.k.phillip...@gmail.com> 2011-05-11 
11:06:33 PDT ---
The following code compiles for 2.052 but fails in the beta for 2.053. This is
done in DFL.

break.d(3): Error: variable value cannot be read at compile time

class B {
static:
    ushort v2 = value;
    const ushort value = 342;
}
void main() {
}

You can fix this by moving the declaration up or by defining it as an enum.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to