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

           Summary: Array Literals as Default Field Initializers Shared
                    Across Instances.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2010-06-23 17:04:12 PDT ---
import std.stdio;

struct Foo {
    int[] bar = [1, 2, 3, 4, 5];
}

void main() {
    Foo foo;
    foo.bar[0] = 3;

    Foo foo2;
    writeln(foo2.bar);  // 3 2 3 2 5
}

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

Reply via email to