[Issue 6176] [tdpl] Cannot use string variables in case expressions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 18 04:40:23 PST 2012


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



--- Comment #16 from bearophile_hugs at eml.cc 2012-01-18 04:40:14 PST ---
(In reply to comment #13)
> There are two very different use cases in D here.

An option is to add another kind of switch attribute:

enum switch (foo) {
    case c1: break; // all c1,c2 must be a compile-time constants
    case c2: break;
    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