Files
scriptc/tests/diagnostics/self-returning-function.ts
2026-07-22 18:08:04 -05:00

9 lines
287 B
TypeScript

// A function returning ITSELF has a type with no structural floor —
// mapType's depth guard answers unmappable instead of overflowing the stack
// (invariant signature 15), and the uses fence by name.
function somefn() {
return somefn;
}
const g = somefn();
console.log(typeof g);