The following fragment, which uses the static initialization of s, marks D unused today:
function sideAffecting(): number {
console.log("called");
return 10;
}
function foo() {
class D {
static s: number = sideAffecting();
}
}
foo();
Initially mentioned in #16078 but this is a separate issue.