Files
scriptc/tests/corpus/js-uninitialized-native-fields.js
Chris Tate c257368c5e Compile Effect generators statically (#589)
* Compile Effect generators statically

* test: declare the dormant array write's expected fence
2026-09-30 14:25:29 -05:00

17 lines
485 B
JavaScript

class State {
bytes;
name;
count;
constructor() {
console.log(typeof this.bytes, this.bytes ? "set" : "unset");
console.log(typeof this.name, this.name ? "set" : "unset");
console.log(typeof this.count, this.count === undefined);
this.bytes = new Int32Array([7, 9]);
this.name = "ready";
this.count = 3;
console.log(this.bytes ? this.bytes[1] : -1, this.name, this.count);
}
value() { return this.bytes[0]; }
}
console.log(new State().value());