[Issue 2852] New: Cannot pass temporary result by reference (regression)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 18 05:11:45 PDT 2009


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

           Summary: Cannot pass temporary result by reference (regression)
           Product: D
           Version: 2.026
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: 2korden at gmail.com


Test code:

struct Rect
{
    int x,y,w,h;
}

void pass(ref Rect rect)
{
}

Rect get()
{
    return Rect();
}

void main()
{
    pass(get);
}

Note that this is a regression since DMD2.025


-- 



More information about the Digitalmars-d-bugs mailing list