Sha256: 5fde20cc958c588248a05c01ef39db788daeaf4e1a59b970dafb45eeb8064654

Contents?: true

Size: 847 Bytes

Versions: 43

Compression:

Stored size: 847 Bytes

Contents

/*jsl:option explicit*/
function missing_default_case() {
    var i, s;

    /*missing default case*/
    switch (i) {
      case 1:
        return 1;
    } /*warning:missing_default_case*/

    /* ambivalence - allow fallthru but don't enforce it */
    switch (i) {
      case 2:
        /*jsl:fallthru*/
      case 3:
        s += 1;
        break;
      default:
        break;
    }

    /* ok - intended use of fallthru */
    switch (i) {
      case 0:
        s += "?";
        /*jsl:fallthru*/
      case 1:
        s += "!";
        break;
      default:
        break;
    }

    /* ok - intended use of fallthru */
    switch(i) {
      case 1:
        try {
            i++;
        }
        catch(e)
        {}
        /*jsl:fallthru*/
      case 2:
        i--;
        break;
      default:
        break;
    }

    return "";
}

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
distil-0.14.5.a vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.4 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.3 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.2 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.2.a vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.1 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.1.a vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.0 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.0.i vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.0.h vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.0.g vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.0.d vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.0.c vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.14.0.b vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.13.6 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.13.5 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.13.4 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.13.3 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.13.2 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.13.1 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js