Summary: Passing result of a function call as ref argument no
                    longer works
           Product: D
           Version: 1.046
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD

The following code works with dmd 1.045, but not with 1.046. It seems you can
no longer pass the result of a function call as argument to ref parameters.

While it's debatable if the old or new behavior is better, the chan ge breaks
existing code.

struct X {

X i() {
    return X.init;

void foo(ref X x) {

void foo() {
    foo(i()); //line 12

This fails with
test.d(12): Error: cannot assign to function call

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to