swc/bundler/tests/fixture/issue-1156-1/input/entry.ts
강동윤 5a91ab994c
bundler: Fix dead code elimination (#1157)
swc_bundler:
 - Fix dce bug. (#1156)

swc_ecma_transforms:
 - resolver: Ignore non-computed class properties.
 - dce: Handle usages in class property initializers.
2020-10-12 00:36:44 +09:00

15 lines
141 B
TypeScript

import { d, D } from "./q.ts";
class A {
private s: D = d();
a() {
this.s.resolve();
}
b() {
this.s = d();
}
}
new A();