Files
scriptc/tests/corpus/array-fill-unit-values.ts
T
Chris Tate ee9f0d64eb feat: ship the self-hosted native scriptc CLI (#585)
* feat: ship the self-hosted native scriptc CLI

- Run the shared compiler and CLI natively, including library builds and compile-time evaluation.
- Install native platform packages and ship relocatable standalone distributions.
- Preserve program semantics and reuse validated build artifacts for fast rebuilds.

* fix: complete native CLI integration and validation

- Preserve library diagnostics and run recursive compiler work on the main stack.
- Restore packaged helper permissions and exercise native npm and Wasm library builds.
- Recover interrupted Sandbox status probes within the original command deadline.
2026-09-30 02:17:56 -05:00

11 lines
618 B
TypeScript

const empty = new Array<null>(3).fill(null);
console.log(JSON.stringify(empty), empty.map((value, index) => String(index) + ":" + String(value === null)).join(","));
const mixed: (number | null)[] = [1, 2, 3, 4];
console.log(JSON.stringify(mixed.fill(null, 1, -1)));
console.log(JSON.stringify(mixed.fill(7, 2)));
let calls = 0;
function nil(): null { calls++; return null; }
console.log(JSON.stringify(mixed.fill(nil())), calls);
const missing = new Array<undefined>(2).fill(undefined);
console.log(JSON.stringify(missing), missing.map((value, index) => String(index) + ":" + String(value === undefined)).join(","));