]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/class-syntax-tdz.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / class-syntax-tdz.js
CommitLineData
ed1e77d3
A
1
2class A {
3 constructor() { }
4}
5
6class B extends A {
7 constructor() {
8 this;
9 super();
10 }
11}
12
13noInline(B);
14
15for (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}