[Issue 6176] [TDPL] Cannot use string variables in case expressions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 19 16:28:38 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6176
--- Comment #5 from bearophile_hugs at eml.cc 2011-06-19 16:23:49 PDT ---
(In reply to comment #4)
> If the case values are all constant, create this tree. Otherwise, just compare
> the switched value with the cases individually.
This is possible, of course, it just requires a bit more complex compiler.
A problem: if one of your strings are not compile-time const, because of a
mistake of the programmer, there is a silent and invisible loss of performance.
--
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