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



--- Comment #8 from Jonathan M Davis <jmdavisp...@gmx.com> 2011-07-08 01:13:14 
PDT ---
Well, it works with variables which are of type int. TDPL claims that it works
with variables, and switch statements work with integral types and strings. So,
per TDPL, switch statements should work with string variables.

Now, personally, I'm very surprised that _any_ type of variable would be
permitted as the value of a case statement under any circumstances, and it
wouldn't hurt my feelings one whit if it were removed from the language
completely. I see no value in such a feature. However, TDPL is pretty clear
about allowing variables, so it certainly didn't get in there by accident (and
using integer variables _does_ currently work).

So, it's fine with me if this is declared as an errata for TDPL, but I don't
think that it's a case of TDPL being unclear.

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

Reply via email to