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