| A = class extends String { } |
| B = class extends A { get 4() { return 1; } } |
| // String objects have a non-writable length property |
| if (a.length !== 3 || b.length !== 3 || c.length !== 3) |
| throw "not string objects"; |
| if (!(a instanceof A && a instanceof String)) |
| throw "a has incorrect prototype chain"; |
| if (!(b instanceof B && b instanceof A && b instanceof String)) |
| throw "b has incorrect prototype chain"; |
| if (!(c instanceof C && c instanceof B && c instanceof A && c instanceof String)) |
| throw "c has incorrect prototype chain"; |
| if (a[4] !== undefined || b[4] !== 1 || c[4] !== 1) |
| throw "bad indexing type with accessors on chain"; |
| if (a[3] !== 1 || b[3] !== 1 || c[3] !== 1) |
| throw "bad indexing type with values on chain"; |
| for (i = 0; i < 10000; i++) |