summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/class/derivedConstructorTDZReturnObject.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/class/derivedConstructorTDZReturnObject.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/tests/non262/class/derivedConstructorTDZReturnObject.js b/js/src/tests/non262/class/derivedConstructorTDZReturnObject.js
new file mode 100644
index 0000000000..48206a881e
--- /dev/null
+++ b/js/src/tests/non262/class/derivedConstructorTDZReturnObject.js
@@ -0,0 +1,13 @@
+class foo extends null {
+ constructor() {
+ // If you return an object, we don't care that |this| went
+ // uninitialized
+ return {};
+ }
+}
+
+for (let i = 0; i < 1100; i++)
+ new foo();
+
+if (typeof reportCompare === 'function')
+ reportCompare(0,0,"OK");