Ferenc Kovacs wrote (on 13/08/2014):

    It is not selecting the first default, it just never needs to look
    for a default, because it has already found a matching case label.


yes, and it continues the execution from the first matching case and correctly evaluates the following defaults, as default matches everything, which imo should be the correct behavior.

No, it does not "evaluate the following defaults"; it evaluates all following code. Once a label has been selected, you can think of all subsequent labels being removed from the code completely.

having a different behavior for default when there is a preceeding matching empty case is not the expected(from the userland point of view) behavior imo.

There is no different behaviour. Labels which do not match the input have no effect on execution, and default labels have no effect if any other label matched.

Reply via email to