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.13.0 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.12.6 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.12.4 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.12.3 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.12.2 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.12.1 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.12.0 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.11.8 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.11.6 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.11.5 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.11.4 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.11.3 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.11.1 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.11.0 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.10.4 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.10.3 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.10.1 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.10.0 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.8.4 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js
distil-0.8.2 vendor/jsl-0.3.0/tests/warnings/missing_default_case.js