test/jdk/tools/jjs/es6.js
changeset 47216 71c04702a3d5
parent 34721 59801fbd042e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/tools/jjs/es6.js	Tue Sep 12 19:03:39 2017 +0200
@@ -0,0 +1,13 @@
+/*
+ * 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);
+    }
+}