[Issue 596] Support array, arrayliteral and struct in switch and case

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 7 05:15:30 PST 2011


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



--- Comment #3 from bearophile_hugs at eml.cc 2011-01-07 05:13:09 PST ---
A possible improvement for the switch on structs is to support wildcards in
some way:

struct Foo { int x, y; }
void main() {
    auto f = Foo(1, 2);
    int f;
    switch (f) {
        case Foo(1, _): break; // all structs where x==1, y == don't care
        default: break;
    }
}

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