drop unused "class" definition IIFEs (#2923)

fixes #805
This commit is contained in:
Alex Lam S.L
2018-02-17 05:11:31 +08:00
committed by GitHub
parent e529f54e90
commit 7fdd2082a6
4 changed files with 124 additions and 15 deletions

View File

@@ -4619,3 +4619,26 @@ issue_2914_2: {
}
expect_stdout: "0"
}
issue_805: {
options = {
collapse_vars: true,
pure_getters: "strict",
reduce_vars: true,
}
input: {
function f() {
function Foo(){}
Foo.prototype = {};
Foo.prototype.bar = 42;
return Foo;
}
}
expect: {
function f() {
function Foo(){}
(Foo.prototype = {}).bar = 42;
return Foo;
}
}
}