Summary: Can't use a 'version' that was set inside 'static if'
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD

--- Comment #0 from Nick Sabalausky <> 2012-01-28 
03:56:26 PST ---
static if(true)
    version = Foo;
version(Foo) {}

test.d(2): Error: version Foo defined after use

The compiler's evaluation seems to occur in the wrong order ("versions before
static ifs" instead of "top to bottom"), because this works:

static if(true)
    version = Foo;
static if(true)
    version(Foo) {}

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

Reply via email to