[Issue 16142] New: Adding a dtor / postblit (even disabled) forces opAssign

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 8 17:22:53 PDT 2016


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 at puremagic.com
          Reporter: mathias.lang at 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.

--


More information about the Digitalmars-d-bugs mailing list