JS: Note issue with .apply() calls

This commit is contained in:
Asger F
2024-08-14 14:34:55 +02:00
parent ac1dd1850e
commit 34e6864fa3
2 changed files with 3 additions and 2 deletions

View File

@@ -29,11 +29,11 @@ function test(x, y) {
let h = [];
Array.prototype.push.apply(h, source());
sink(h); // NOT OK
sink(h); // NOT OK [INCONSISTENCY]
let i = [];
Array.prototype.unshift.apply(i, source());
sink(i); // NOT OK
sink(i); // NOT OK [INCONSISTENCY]
let j = [];
j[j.length] = source();