implement directives (#3203)

fixes #3166
This commit is contained in:
Alex Lam S.L
2018-06-28 18:16:49 +08:00
committed by GitHub
parent 957d5537a8
commit 76df77c08c
9 changed files with 238 additions and 209 deletions

View File

@@ -2025,6 +2025,7 @@ deduplicate_parenthesis: {
drop_lone_use_strict: {
options = {
directives: true,
side_effects: true,
}
input: {
@@ -2052,6 +2053,27 @@ drop_lone_use_strict: {
}
}
issue_3166: {
options = {
directives: true,
}
input: {
"foo";
"use strict";
function f() {
"use strict";
"bar";
"use asm";
}
}
expect: {
"use strict";
function f() {
"use asm";
}
}
}
issue_3016_1: {
options = {
inline: true,