jdk/test/tools/jjs/es6.js
author sundar
Mon, 21 Dec 2015 09:40:00 +0530
changeset 34721 59801fbd042e
permissions -rw-r--r--
8145750: jjs fails to run simple scripts with security manager turned on Reviewed-by: hannesw, alanb

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