http://d.puremagic.com/issues/show_bug.cgi?id=5714
Andrej Mitrovic <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Andrej Mitrovic <[email protected]> 2012-12-02 05:55:57 PST --- (In reply to comment #0) > If case ranges are not allowed on full-range int values, then you can't use > them in a final switch. Basically the compiler just translates this: case 1: .. case 3: call() into: case 1: case 2: case 3: call() And it also limits the number of cases to 256 (for optimization purposes?). So a final switch would only work on byte-types. I'm not sure if Walter would like a feature that only works with one fundamental type. Note also that because `final switch` currently works on ints (personally I would reject such code), people would assume they could add case ranges for the full int type, but they would get the 256 case limitation error instead. As a current workaround you could use a mixin that generates the case statements and a 'default' which throws a SwitchError. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
