fix corner cases in switch and undefined (#1762)

- fix side effects in switch condition for singular blocks
- fix `undefined` confusion with local variable
- gate `OPT(AST_Switch)` with `switches`

fixes #1758
fixes #1759
This commit is contained in:
Alex Lam S.L
2017-04-02 14:52:25 +08:00
committed by GitHub
parent c076e7b60d
commit f7ca4f2297
5 changed files with 159 additions and 15 deletions

View File

@@ -2,6 +2,7 @@ case_1: {
options = {
dead_code: true,
evaluate: true,
switches: true,
}
input: {
var a = 0, b = 1;