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

13 lines
322 B
TypeScript

// The dead-strip counterpart: the same class-instance for-in that builds
// fine while unreached (tests/corpus/420-dead-strip-modules) fails the
// build the moment the entry path reaches it.
class Widget {
id = 1;
}
function walk(w: Widget): void {
for (const k in w) {
console.log(k);
}
}
walk(new Widget());