| function assert(b, m = "Bad!") { |
| function test(f, iters = 1000) { |
| for (let i = 0; i < iters; i++) |
| function shouldThrowTDZ(f) { |
| assert(e instanceof ReferenceError); |
| assert(e.toString() === "ReferenceError: Cannot access uninitialized variable."); |
| function fooProp() { return 'foo'; } |
| (() => super.foo = 20)(); |
| (() => super[fooProp()] = 20)(); |
| (() => super[fooProp()])(); |
| shouldThrowTDZ(function() { new B; }); |
| shouldThrowTDZ(function() { new C; }); |
| shouldThrowTDZ(function() { new D; }); |
| shouldThrowTDZ(function() { new E; }); |
| shouldThrowTDZ(function() { new F; }); |
| shouldThrowTDZ(function() { new G; }); |
| shouldThrowTDZ(function() { new H; }); |
| shouldThrowTDZ(function() { new I; }); |