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

           Summary: -inline failure involving CTFE, nested functions, a
                    ref parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: mailm...@nilsb.dyndns.org


--- Comment #0 from Nils <mailm...@nilsb.dyndns.org> 2012-08-11 12:48:35 PDT ---
test.d:
---
int f() {
    static void one(ref int x) {
        x = 1;
    }
    static void go() {
        int y;
        one(y);
        assert(y == 1); // fails with -inline
    }
    go();
    return 0;
}
enum e = f();
---

$ dmd -c -o- test.d
$ dmd -c -o- -inline test.d
test.d(8): Error: assert(y == 1) failed
test.d(10):        called from here: go()
test.d(13):        called from here: f()

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

Reply via email to