www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13633] New: __fieldPostBlit generates even if this(this)

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

          Issue ID: 13633
           Summary: __fieldPostBlit generates even if this(this)
                    anntotated with  disable
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: wazar.leollone yahoo.com

module test1;

struct A
{
    this(this)
    {
    }
}

struct B
{
    A a;
}

struct C
{
    const B b;
     disable this(this);
} 

This code raises an error "Error: 
mutable method test1.B.__fieldPostBlit is not callable using a 
const object"
However __fieldPostBlit shouldn't be generated for C, because C has a disabled
postblit.

--
Oct 18 2014