mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
This branch lowers Number.prototype.toPrecision statically, so the tier-demotions and dynamic-mix coverage fixtures lost the operation they used as "no static lowering". Use n.toLocaleString() instead: the host's default locale is something a compiled binary cannot carry, so it stays refused (SC2020) and the fixtures keep the same blocker and demotion request on the same lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
437 B
TypeScript
11 lines
437 B
TypeScript
// Native checked values and loose equality share this program with
|
|
// native compilation refusals (a default-locale toLocaleString, SC2020).
|
|
const v: any = 21;
|
|
const doubled = v * 2;
|
|
const root = Math.cbrt(81);
|
|
const up = (19.99).toLocaleString();
|
|
const parsed = Number.parseFloat("1.5"); // a string argument compiles statically, like the global
|
|
const unknownScore: unknown = 81;
|
|
const flags = unknownScore == 81;
|
|
console.log("done");
|