jdk-24/jdk/test/tools/jjs/es6.js
Athijegannathan Sundararajan 4ab55ae7c1 8145750: jjs fails to run simple scripts with security manager turned on
Reviewed-by: hannesw, alanb
2015-12-21 09:40:00 +05:30

14 lines
271 B
JavaScript

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