]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/class-syntax-tdz-in-conditional.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / class-syntax-tdz-in-conditional.js
1
2 class A {
3 constructor() { }
4 }
5
6 class B extends A {
7 constructor(accessThisBeforeSuper) {
8 if (accessThisBeforeSuper)
9 this;
10 else {
11 this;
12 super();
13 }
14 }
15 }
16
17 noInline(B);
18
19 for (var i = 0; i < 10000; ++i) {
20 var exception = null;
21 try {
22 new B(false);
23 } catch (e) {
24 exception = e;
25 }
26 if (!exception)
27 throw "Exception not thrown for an unitialized this at iteration " + i;
28 }