Case Range Statement ..
Tim Matthews
tim.matthews7 at gmail.com
Tue Jul 7 06:45:04 PDT 2009
Andrei Alexandrescu wrote:
>
> Prepare to be surprised. Compile this:
>
> void main()
> {
> switch (2)
> {
> case (1, 2): break;
> default: break;
> }
> }
>
>
I'm getting the message that it is impossible to override what is
already and expression evaluating to the last in the comma sequence
which is not the case as other meanings exist for function calls and
templates etc.
Not surprising that it currently picks the default of just the
expression in anyway and it would probably be in error if it didn't
currently do so.
More information about the Digitalmars-d
mailing list