[Issue 7579] Disabled postblit ignored and not called by all array operations

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 2 03:27:01 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7579


Denis Shelomovskij <verylonglogin.reg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
            Summary|disabled postblit not       |Disabled postblit ignored
                   |checked for array appending |and not called by all array
                   |                            |operations
           Severity|normal                      |major


--- Comment #4 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2012-07-02 14:29:39 MSD ---
This compiles and runs successfully:
---
struct Foo
{
    // postblit can also have no body because isn't called
    @disable this(this) { assert(0); }
}

void main()
{
    Foo[3] sarr1, sarr2;
    sarr2 = sarr1;

    Foo[] darr1 = new Foo[3], darr2 = new Foo[3];
    darr2[] = darr1[];

    Foo s;
    darr1 ~= s;

    darr1 = darr1 ~ s ~ darr2;
}
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list