Files
scriptc/tests/deadstrip/reached-comptime-throw.ts
2026-07-22 18:08:04 -05:00

10 lines
315 B
TypeScript

// comptime bakes at lowering: a REACHED comptime callback that throws
// fails the build at compile time (the unreached twin in
// tests/corpus/420-dead-strip-modules never evaluates at all).
function boom(): number {
return comptime((): number => {
throw "evaluated after all";
});
}
console.log(boom());