Files
scriptc/tests/diagnostics/dynamic-surface.ts
Chris Tate 2c8e31b1ff Rendered snapshots for the integer-boundary refusal codes; dynamic-surface fixture re-based
- library-int suite snapshots SC4021/SC4022/SC4023 rendered end to end (slot path, evidence, span, fix) — the diagnostics-corpus discipline for codes the executable lane cannot reach
- dynamic-surface diagnostics fixture swaps Math.ceil for Math.sqrt (trunc/ceil compile statically now) and its snapshot regenerates
2026-07-24 11:52:12 -05:00

16 lines
783 B
TypeScript

// The island-backed ambient surface (Math beyond the static members,
// number methods, string-pattern replace/at, the Number statics, ...)
// typechecks against real static types but executes in the embedded
// engine: in a static build every use site is its own SC2012 naming the
// flag — never an ICE, never a link error. (Math.floor/abs/round and the
// ask-4 wholeness-discharge pair Math.trunc/ceil, .split(string), the
// trim/pad variants, parseInt, isNaN, and the global parseFloat/isFinite
// over exactly-typed arguments compile statically now and no longer
// appear here.)
const up = Math.sqrt(2);
const tau = Math.PI * 2;
const price = (19.99).toFixed(2);
const swapped = "banana".replace("an", "AN");
const ch = "hello".at(0);
const n = Number.parseFloat("3.14");