Added test case for Uint8Array and TypedArray.prototype.buffer

This commit is contained in:
Napalys
2025-04-07 12:32:18 +02:00
parent a885e61875
commit 93882263f9
2 changed files with 15 additions and 0 deletions

View File

@@ -40,6 +40,9 @@ consistencyIssue
| nested-props.js:20 | expected an alert, but found none | NOT OK - but not found | Consistency |
| stringification-read-steps.js:17 | expected an alert, but found none | NOT OK | Consistency |
| stringification-read-steps.js:25 | expected an alert, but found none | NOT OK | Consistency |
| typed-arrays.js:5 | expected an alert, but found none | NOT OK | Consistency |
| typed-arrays.js:7 | expected an alert, but found none | NOT OK | Consistency |
| typed-arrays.js:11 | expected an alert, but found none | NOT OK | Consistency |
flow
| access-path-sanitizer.js:2:18:2:25 | source() | access-path-sanitizer.js:4:8:4:12 | obj.x |
| addexpr.js:4:10:4:17 | source() | addexpr.js:7:8:7:8 | x |

View File

@@ -0,0 +1,12 @@
function test() {
let x = source();
let y = new Uint8Array(x);
sink(y); // NOT OK
sink(y.buffer); // NOT OK
sink(y.length);
var arr = new Uint8Array(y.buffer, y.byteOffset, y.byteLength);
sink(arr); // NOT OK
}