Files
scriptc/tests/diagnostics/any.ts
Chris Tate e2d58f60d2 Expand static support for common Effect 4 patterns (#600)
* Expand static compilation for common Effect 4 patterns

* Run every Effect 4 fixture slice in CI

* Preserve existing corpus behavior across Effect 4 lowering

* Preserve Effect platform callbacks and native stream state

* Record new corpus baselines and retain child stdin refusals

* Retire the obsolete stateful regex diagnostic

* Preserve promise reference count layout for cycle collection
2026-10-01 17:36:29 -05:00

11 lines
647 B
TypeScript

// The honest static subset of `any` compiles now — bindings, params,
// returns, assignments, reads ride the checked-dynamic tree — so what this
// fixture pins is the RESIDUE: operations only the engine's full JS
// semantics can run. Each site reports the choice: opt into the embedded
// engine, or stay static with 'unknown' + a checked cast.
const n: any = 41;
const sum = n + 1; // ToNumber/ToPrimitive coercion — engine only
var { x } = <any>0; // destructuring a non-object 'any' — engine only
for (const v of n as any) console.log(v); // native checked iteration reports non-iterables at runtime
export const marker: number = 1;