Yes, that's expected behavior in D. Unlike C, there is no implied
default: break;
inserted in a switch statement without an explicit break. D will insert an
implicit
default: throw new SwitchError();

Thanks, Walter.
My assumption was that command line:
dmd.exe test.d
will produce release version. That was wrong (why, btw?).
It produces debug version and so I am getting
new SwitchError();
And only if I explicitly say "-release" then it disappears.
Andrew.

My guess is that nearly all compiles are done to create an edition of the
application that is about to undergo testing, as opposed to an edition that
is destined for an end-user. (Except, of course, if you're MS :D )
So, one would only use the -release option to create the edition that will
be used for User Acceptance Testing or similar, and that will be used to
create shippable copies of the application.
--
Derek Parnell
Melbourne, Australia
http://www.dsource.org/projects/build/http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage
15/03/2005 2:33:08 PM

My guess is that nearly all compiles are done to create an edition of the
application that is about to undergo testing, as opposed to an edition

that

is destined for an end-user. (Except, of course, if you're MS :D )
So, one would only use the -release option to create the edition that will
be used for User Acceptance Testing or similar, and that will be used to
create shippable copies of the application.

My guess is that nearly all compiles are done to create an edition of the
application that is about to undergo testing, as opposed to an edition

that

is destined for an end-user. (Except, of course, if you're MS :D )
So, one would only use the -release option to create the edition that
will
be used for User Acceptance Testing or similar, and that will be used to
create shippable copies of the application.

The thing is that -debug and -release are *unrelated* options.
-debug activates a "version" (i.e. the debug { } code areas),
while -release removes contracts and switch/bounds checking
Then there are also the -g and -O flags too, which are also
semi-related but totally different. And of course -inline...
And yes, it's a little confusing (at least at first)
--anders