[Issue 11343] New: Error: multiple field initialization

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 24 12:56:08 PDT 2013


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

           Summary: Error: multiple field initialization
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: rswhite4 at googlemail.com


--- Comment #0 from rswhite4 at googlemail.com 2013-10-24 12:56:06 PDT ---
Code:
----
import std.stdio;

enum Foo {
    A = 1,
    B = 2
}

struct Test {
public:
    const ubyte[Foo] test;

    this(Foo f) {
        if (Foo.A & f)
            this.test[Foo.A] = 1;
        if (Foo.B & f)
            this.test[Foo.B] = 2;
    }
}

void main() {
    Test t = Test(Foo.A);
}
----

Flag_TEst.d(16): Error: multiple field test initialization

Tested with the latest beta.
Worked in 2.063.2

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