www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12650] New: GIT HEAD : Invalid codegen

https://issues.dlang.org/show_bug.cgi?id=12650

          Issue ID: 12650
           Summary: GIT HEAD : Invalid codegen
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: temtaime gmail.com

import std.stdio;

struct S {
    int a;
}

void foo(ref in S s) {}

class A {
    this()(auto ref in S a) { foo(s = a); }

    S s;
}

void main() {
    new A(S(2)).s.writeln;
}

GIT HEAD output : 0
2.065 output : 2

Expected output : 2

--
Apr 25 2014