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

--- Comment #0 from Jesse Phillips <> 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 {
    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:
------- You are receiving this mail because: -------

Reply via email to