[JSC] Do not use asArrayModes() with Structures because it discards TypedArray inform...
[WebKit-https.git] / JSTests / stress / custom-prototype-may-be-same-to-original-one.js
1 function shouldBe(actual, expected) {
2     if (actual !== expected)
3         throw new Error(`bad value: ${String(actual)}`);
4 }
5
6 var boundFunction = function(){}.bind();
7 Object.defineProperty(boundFunction, "prototype", {
8     value: Array.prototype
9 });
10 var result = Reflect.construct(Array, [], boundFunction);
11 shouldBe(result.__proto__, Array.prototype);