May 19, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6037

           Summary: [CTFE] recursive ref parameters evaluated incorrectly
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: clugdbug@yahoo.com.au


--- Comment #0 from Don <clugdbug@yahoo.com.au> 2011-05-19 12:33:11 PDT ---
To fix this, CTFE will need to properly implement a stack for variables to be stored on.
-------------
void bug6037(ref int x, bool b){
    int w = 3;
    if (b) {
        bug6037(w, false);
        assert(w==6);
    } else {
        x = 6;
        assert(w==3); // fails
    }
}

int bug6037outer(){
    int q;
    bug6037(q, true);
    return 401;
}
static assert(bug6037outer() == 401);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 31, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6037


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2011-12-31 15:21:44 PST ---
https://github.com/D-Programming-Language/dmd/commit/2605252929c5122341d3ecae77df1374e4131059

https://github.com/D-Programming-Language/dmd/commit/75fc400041049ab89f0ac5764a3ee7620db02d88

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