summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/class/defaultConstructorNotCallable.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/class/defaultConstructorNotCallable.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/tests/non262/class/defaultConstructorNotCallable.js b/js/src/tests/non262/class/defaultConstructorNotCallable.js
new file mode 100644
index 0000000000..558f8dcc2f
--- /dev/null
+++ b/js/src/tests/non262/class/defaultConstructorNotCallable.js
@@ -0,0 +1,8 @@
+class badBase {}
+assertThrowsInstanceOf(badBase, TypeError);
+
+class badSub extends (class {}) {}
+assertThrowsInstanceOf(badSub, TypeError);
+
+if (typeof reportCompare === 'function')
+ reportCompare(0,0,"OK");