SWITCH_CASE_COMPLETES_NORMALLY constant

CompileTimeErrorCode const SWITCH_CASE_COMPLETES_NORMALLY

It is an error if any case of a switch statement except the last case (the default case if present) may complete normally. The previous syntactic restriction requiring the last statement of each case to be one of an enumerated list of statements (break, continue, return, throw, or rethrow) is removed.

Implementation

static const CompileTimeErrorCode SWITCH_CASE_COMPLETES_NORMALLY =
    CompileTimeErrorCode('SWITCH_CASE_COMPLETES_NORMALLY',
        "The 'case' should not complete normally.",
        correction: "Try adding 'break', or 'return', etc.")