summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/class/derivedConstructorTDZExplicitThis.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/class/derivedConstructorTDZExplicitThis.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/tests/non262/class/derivedConstructorTDZExplicitThis.js b/js/src/tests/non262/class/derivedConstructorTDZExplicitThis.js
new file mode 100644
index 0000000000..4a4922d57e
--- /dev/null
+++ b/js/src/tests/non262/class/derivedConstructorTDZExplicitThis.js
@@ -0,0 +1,12 @@
+class foo extends null {
+ constructor() {
+ this;
+ assertEq(false, true);
+ }
+}
+
+for (let i = 0; i < 1100; i++)
+ assertThrownErrorContains(() => new foo(), "this");
+
+if (typeof reportCompare === 'function')
+ reportCompare(0,0,"OK");