summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/superCallInvalidBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_6/Class/superCallInvalidBase.js')
-rw-r--r--js/src/tests/ecma_6/Class/superCallInvalidBase.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Class/superCallInvalidBase.js b/js/src/tests/ecma_6/Class/superCallInvalidBase.js
new file mode 100644
index 000000000..86b24f96c
--- /dev/null
+++ b/js/src/tests/ecma_6/Class/superCallInvalidBase.js
@@ -0,0 +1,9 @@
+class instance extends null {
+ constructor() { super(); }
+}
+
+assertThrowsInstanceOf(() => new instance(), TypeError);
+assertThrowsInstanceOf(() => new class extends null { }(), TypeError);
+
+if (typeof reportCompare === 'function')
+ reportCompare(0,0,"OK");