www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15515] New: default construction disabled for struct


          Issue ID: 15515
           Summary: default construction disabled for struct constructor
                    with default arguments
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << EOF
struct S {
    this(string r = ".") {

void test() {
    S s;

dmd -c bug

bug.d(7): Error: variable bug.test.s default construction is disabled for type

This was turned into an error between 2.069.2 and 2.070.0 without any
deprecation step.

Jan 04 2016