blob: 6874923971983dcda34c269392117b1748e67b4a [file] [log] [blame]
commit-queue@webkit.orga4201b02015-08-17 22:24:20 +00001var A = class A { };
2var B = class B extends A {
3 constructor(accessThisBeforeSuper) {
4 if (accessThisBeforeSuper) {
5 var f = () => this;
6 super();
7 } else {
8 super();
9 }
10 }
11};
12
13var exception = null;
14for (var i=0; i<10000; i++) {
15 try {
16 new B(true);
17 } catch (e) {
18 exception = e;
19 if (!(e instanceof ReferenceError))
20 throw "Exception thrown was not a reference error";
21 }
22
23 if (!exception)
24 throw "Exception not thrown for an unitialized this at iteration";
25
26 var e = new B(false);
27}