www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15500] New: 'default construction is disabled for type' even

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

          Issue ID: 15500
           Summary: 'default construction is disabled for type' even
                    though one should be available with default arg
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: timothee.cour2 gmail.com

$dmd_068_X -c -o- $bugs_D/bug_D20160102T173458.d
ok


DMD64 D Compiler v2.069-devel-6b2b521
dmd -c -o- $bugs_D/bug_D20160102T173458.d
Error: variable a default construction is disabled for type A

----
struct A{
  this(int a=0){
  }
}

void fun(){
  static A a;
}
----

--
Jan 02 2016