www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16142] New: Adding a dtor / postblit (even disabled) forces

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

          Issue ID: 16142
           Summary: Adding a dtor / postblit (even disabled) forces
                    opAssign
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: mathias.lang sociomantic.com

```
struct A
{
     disable this(this);
     disable void opAssign(const A);
}

struct B
{
    A a;
}

void main()
{
    B b;
    b = B();
}
```

This compiles and run without problem, even though `A` has its `opAssign`
disabled.

--
Jun 08 2016