fix boolean context detection (#3466)

fixes #3465
This commit is contained in:
Alex Lam S.L
2019-10-12 03:42:57 +08:00
committed by GitHub
parent 6d57ca1a59
commit eba3a37bb5
3 changed files with 89 additions and 31 deletions

View File

@@ -985,6 +985,7 @@ TreeWalker.prototype = {
fn = this.parent(++i);
if (!fn) return false;
} while (!(fn instanceof AST_Lambda));
if (fn.name) return false;
self = this.parent(++i);
if (!self || self.TYPE != "Call" || self.expression !== fn) return false;
} else {