[Issue 5713] Broken final switch on ints

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 5 06:59:31 PST 2012


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



--- Comment #9 from bearophile_hugs at eml.cc 2012-02-05 06:59:27 PST ---
Turning bugs into enhancement requests is a good way to reduce bug count, but
it doesn't address the problems. 

"enhancement" sounds like something that someone wants to add, like switching
on structs. But this is not the case. Given a sane definition of final switch,
asking the compiler to refuse code like this at compile-time is not an
enhancement:


void main() {
    int x = 100;
    final switch (x % 3) {
        case 0: break;
        case 1: break;
    }
}


Then maybe we need a "wrong_specs" tag in Bugzilla, for the situations where
the compiler is working as the spec say, but where the spec themselves look
wrong.

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