fix typeof side-effects (#1669)

`has_side_effects()` does not take `typeof`'s magical power of not tripping over undeclared variable into account.

fixes #1668
This commit is contained in:
Alex Lam S.L
2017-03-25 17:40:18 +08:00
committed by GitHub
parent 8ca2401ebe
commit 6e86ee950d
2 changed files with 14 additions and 2 deletions

View File

@@ -48,3 +48,15 @@ typeof_in_boolean_context: {
foo();
}
}
issue_1668: {
options = {
booleans: true,
}
input: {
if (typeof bar);
}
expect: {
if (!0);
}
}