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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 18 06:45:28 PST 2012


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



--- Comment #17 from Stewart Gordon <smjg at iname.com> 2012-01-18 06:45:23 PST ---
(In reply to comment #16)
> (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;
> }

We already have an enum switch - it's called final switch.  Inventing something
new and calling it enum switch will be confusing.  What would it be anyway -
just an optional check for the programmer similar to the override attribute?

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