summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/class/derivedConstructorTDZReturnTry.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/class/derivedConstructorTDZReturnTry.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/tests/non262/class/derivedConstructorTDZReturnTry.js b/js/src/tests/non262/class/derivedConstructorTDZReturnTry.js
new file mode 100644
index 0000000000..96791c0e78
--- /dev/null
+++ b/js/src/tests/non262/class/derivedConstructorTDZReturnTry.js
@@ -0,0 +1,16 @@
+class base {}
+class derived extends base {
+ constructor() {
+ try {
+ return;
+ } catch (e) {
+ try {
+ return;
+ } catch (e) {}
+ }
+ }
+}
+assertThrowsInstanceOf(() => new derived, ReferenceError);
+
+if (typeof reportCompare === 'function')
+ reportCompare(0,0,"OK");