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

RazvanN <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #7 from RazvanN <[email protected]> ---
This the correct behavior. The compiler identifies the end of a case statement
if it has encountered another case/default statement or the ending `}` of the
switch statement. Once a version identifier or even a static if is encountered,
the parser sees it as part of the case statement that it is analyzing at that
time.

A workaround would be to add the version block in the default statement and
lose the `case 2` statement.

Closing as invalid.

--

Reply via email to