]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/class-syntax-no-tdz-in-conditional.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / class-syntax-no-tdz-in-conditional.js
diff --git a/tests/stress/class-syntax-no-tdz-in-conditional.js b/tests/stress/class-syntax-no-tdz-in-conditional.js
new file mode 100644 (file)
index 0000000..71276b1
--- /dev/null
@@ -0,0 +1,18 @@
+
+class A {
+    constructor() { }
+}
+
+class B extends A {
+    constructor(accessThisBeforeSuper) {
+        if (accessThisBeforeSuper)
+            this;
+        else
+            super();
+    }
+}
+
+noInline(B);
+
+for (var i = 0; i < 10000; ++i)
+    new B(false);