Sha256: bb62121a651bdfdd4a99767dcc4acf0d5e645fb48e0503ea2fb32955964081e4

Contents?: true

Size: 596 Bytes

Versions: 43

Compression:

Stored size: 596 Bytes

Contents

/*jsl:option explicit*/
function unreachable_code() {
    var i;
    i = 0;

    /* unreachable because of break */
    while (i < 100) {
        break;
        i += 1; /*warning:unreachable_code*/
    }

    /* unreachable because of continue */
    while (i > 100) {
        continue;
        i += 1; /*warning:unreachable_code*/
    }

    /* unreachable because of return */
    if (i + i < 0) {
        return;
        i = -i; /*warning:unreachable_code*/
    }

    /* unreachable because of throw */
    if (i == 14) {
        throw i;
        i -= 1; /*warning:unreachable_code*/
    }
}

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
distil-0.8.1 vendor/jsl-0.3.0/tests/warnings/unreachable_code.js
distil-0.8.0 vendor/jsl-0.3.0/tests/warnings/unreachable_code.js
distil-0.7.0 vendor/jsl-0.3.0/tests/warnings/unreachable_code.js