| load("./resources/typedarray-constructor-helper-functions.js"); |
| let TypedArray = Object.getPrototypeOf(Int32Array); |
| class A extends TypedArray { |
| constructor() { super(); } |
| if (this.i < foo.length/2) { |
| foo[Symbol.iterator] = iterator; |
| shouldBeTrue("testConstructor('(foo)', [1,2])"); |
| debug("Test that we don't premptively convert to native values and use a gc-safe temporary storage."); |
| if (this.i < foo.length/2) { |
| foo[Symbol.iterator] = iterator2; |
| shouldBeTrue("testConstructor('(foo)', [1,2])"); |
| shouldBeTrue("testConstructor('(true)', [0])"); |
| shouldBeTrue("testConstructor('(`hi`)', [])"); |