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

           Summary: "Error: non-constant expression" and -inline
           Product: D
           Version: D1
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: nfx...@gmail.com


--- Comment #0 from nfx...@gmail.com 2010-09-05 15:42:44 PDT ---
This only happens with -inline. It worked on dmd 1.055, but fails on dmd 1.057,
1.061, 1.062 and 1.063.

//fails with dmd -c -inline test.d

int a() {
    int r;
    return r; //Error: non-constant expression r
}

int b() {
    return a();
}

void c() {
    void d() {
        auto e = b();
    }
    const int f = b();
}

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

Reply via email to