jdk/test/tools/jjs/es6.js
author duke
Wed, 05 Jul 2017 23:23:09 +0200
changeset 44981 30e75693ae99
parent 34721 59801fbd042e
permissions -rw-r--r--
Merge

/*
 * This is the test JavaScript program used in jjs-es6Test.sh
 */

const X = 4;
try {
    X = 55;
    throw new Error("should have thrown TypeError");
} catch (e) {
    if (! (e instanceof TypeError)) {
        throw new Error("TypeError expected, got " + e);
    }
}