www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14531] New: ` disable this() immutable` disable mutable

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

          Issue ID: 14531
           Summary: ` disable this() immutable` disable mutable default
                    construction, too
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: schuetzm gmx.net

struct S {
     disable this() immutable;
}

void main() {
    S s;
}

=> xx.d(6): Error: variable xx.main.s default construction is disabled for type
S

--
Apr 30 2015