Preserve ThisBinding in conditionals & collapse_vars

Fixes #973
This commit is contained in:
alexlamsl
2016-02-16 18:15:59 +08:00
committed by Richard van Velzen
parent 63b01fe8f9
commit 31a9b05c96
3 changed files with 78 additions and 19 deletions

View File

@@ -5,19 +5,19 @@ remove_redundant_sequence_items: {
(0, 1, _decorators.logThis)();
}
expect: {
(0, logThis)();
logThis();
(0, _decorators.logThis)();
}
}
dont_remove_lexical_binding_sequence: {
dont_remove_this_binding_sequence: {
options = { side_effects: true };
input: {
(0, logThis)();
(0, _decorators.logThis)();
}
expect: {
(0, logThis)();
logThis();
(0, _decorators.logThis)();
}
}