[Issue 8335] `ref` is ignored for static array of stucts with postblit argument

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


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg at gmail.com
            Summary|DMD ignoring ref for array  |`ref` is ignored for static
                   |arguments                   |array of stucts with
                   |                            |postblit argument
           Severity|normal                      |regression


--- Comment #1 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2012-07-02 15:03:40 MSD ---
Another testcase:
---
struct S
{
    int i;
    version(trigger_assert_in_main)
        // `@disable` will just be ignored
        // and postblit will not be called.
        // Looks like because of Issue 7579.
        @disable this(this);
    else
        this(this) { assert(0); }
}

void f(ref S[3] arr)
{
    arr[0].i = 7;
}

void main() {
    S[3] arr;
    f(arr);
    assert(arr[0].i == 7);
}
---

-- 
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