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

Nick Treleaven <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Nick Treleaven <[email protected]> ---
(In reply to bearophile_hugs from comment #0)
>     switch (c) { // OK
>         foreach (X; xy) {
>             case X: break;
>         }
>         default: break;
>     }

The foreach break line above should error, this seems to be the bug. Still
present with 2.074.

>     switch (c) {
>         case 'z': break;
>         foreach (X; xy) {
>             case X: break;
>         }
>         default: break; // Error: switch case fallthrough
>     }
> }

This is correct.

--

Reply via email to