test/jdk/tools/jjs/es6.js
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 34721 jdk/test/tools/jjs/es6.js@59801fbd042e
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse

/*
 * 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);
    }
}