[Issue 15731] Analysis error on explicit case fall-through

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 28 08:09:55 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=15731

coolfool4 at gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |coolfool4 at gmx.com

--- Comment #2 from coolfool4 at gmx.com ---
I can't get errors nor warnings for fallthroughs except with final switches on
enums (-w or -wi don't help).

Compiler versions:
- DMD64 D Compiler v2.082.0
- nightly at https://run.dlang.io/


import std.stdio;

void main() {
    int x = 0;
    switch (x) {
        case 0:
        case 1:
            writeln("woot");
            return;
        default:
    }
}

--


More information about the Digitalmars-d-bugs mailing list