class MyArray extends Array {};
let myArray = new MyArray(6);
myArray = myArray.concat(new MyArray(5));
let array = new Array(6);
array = array.concat(new Array(5));
console.log('myArray length: ', myArray.length);
console.log('array length: ', array.length);
Actual output:
myArray length: 0
array length: 11
Expected output:
myArray length: 11
array length: 11
FEW NOTES:
node v10.0.0-preSeems to be fixed in v8.10.0, I'll close this.
I can reproduce this on macOS and Ubuntu 16.04.
@nodejs/v8 could you comment on whether this is a known fixed bug? It seems to be fixed in v8.10.0 so that's great, but would be good to have more info here for anyone else stuck on a previous 8.x version.
Looks like this was still broken in node v8.9.4 (v8 6.1.534.50) and fixed by node v8.10.0 (v8 6.2.414.50).
I haven't bisected it exactly but I guess this is the fix:
https://chromium-review.googlesource.com/c/v8/v8/+/636695
and this is the original bug:
https://bugs.chromium.org/p/v8/issues/detail?id=6708
Most helpful comment
Looks like this was still broken in node v8.9.4 (v8 6.1.534.50) and fixed by node v8.10.0 (v8 6.2.414.50).
I haven't bisected it exactly but I guess this is the fix:
https://chromium-review.googlesource.com/c/v8/v8/+/636695
and this is the original bug:
https://bugs.chromium.org/p/v8/issues/detail?id=6708