mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-06 08:23:19 +08:00
fieldedErrorReason checked each field of a fielded error class with a fresh inspectSupport walk, so a field typed as the class itself (`next: Chain`) recursed until the compiler's stack overflowed. It now continues the caller's walk, where the class is a recursive shape. The fielded error helper then rendered a cycle by expanding it to the depth budget, where Node prints `<ref *1>` and `[Circular *1]`. Classes whose fields reach the class or one of its bases now run the circular machinery other cycle-capable objects use (circCheck before the depth answer, seenPush, refWrap), which also covers a cycle through a base-typed field of a subclass. New corpus program 6526-error-subclass-cycles.ts. 6187-js-match-or-empty-array.js compiles without its deferred fence now that the match-or-empty union reads through its widened members: the `@deferred-fences: 1` header goes, and the program calls the function the fence used to cover.