Sha256: 5f867c2241bbbfa519a70f177508ec22aac129350678a89eff869478bbf263a2

Contents?: true

Size: 1.25 KB

Versions: 43

Compression:

Stored size: 1.25 KB

Contents

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

    switch (i) {
      case i:
        s += "...";
        break;
      case -1:
        s = "";
        break;
      case duplicate_case_in_switch():
        s = "0";
        break;
      case o.prop:
        i = 4;
        break;
      case "\"str1'":
      case "str2":
        i = null;
        break;

      /* mistake - duplicated */
      case i: /*warning:duplicate_case_in_switch*/
        s = "~";
        break;

      /* mistake - duplicated */
      case -1: /*warning:duplicate_case_in_switch*/
        s = "!";
        break;

      /* mistake - duplicated */
      case duplicate_case_in_switch(): /*warning:duplicate_case_in_switch*/
        s = "";
        break;

      /* mistake - duplicated */
      case o['prop']: /*warning:duplicate_case_in_switch*/
        s = i;
        break;

      /* mistake - duplicated */
      case '"str1\'': /*warning:duplicate_case_in_switch*/
        s = 0;
        break;

      /* ok - not duplicated */
      case 100000000:
      case 100000001:
        s = 1;
        break;

      /* mistake - duplicated */
      case 100000000: /*warning:duplicate_case_in_switch*/
        s = -1;
        break;

      default:
        break;
    }
}

Version data entries

43 entries across 43 versions & 1 rubygems

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