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

Walter Bright <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Walter Bright <[email protected]> ---
What's happening is __d_switch_error is in phobos.lib. Phobos.lib is not
automatically linked in unless there's a "main" definition in the file. Hence
__d_switch_error is undefined.

__d_switch_error is what is called when there isn't a default.

In any case, now this error message is emitted:

test.d(2): Error: switch statement without a default; use final switch or add
default: assert(0); or add default: break;

--

Reply via email to