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

           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
        AssignedTo: nob...@puremagic.com
        ReportedBy: cbkbbej...@mailinator.com


--- Comment #0 from Nick Sabalausky <cbkbbej...@mailinator.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to