[Issue 15500] New: 'default construction is disabled for type' even though one should be available with default arg
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sat Jan  2 17:43:04 PST 2016
    
    
  
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 at puremagic.com
          Reporter: timothee.cour2 at 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;
}
----
--
    
    
More information about the Digitalmars-d-bugs
mailing list