var fn = this;
fn.inlined = false;
var iife = tw.parent();
- var hit = fn instanceof AST_AsyncFunction;
+ var hit = is_async(fn);
var aborts = false;
fn.walk(new TreeWalker(function(node) {
if (hit) return aborts = true;
expect_stdout: "PASS"
node_version: ">=8"
}
+
+issue_4581: {
+ options = {
+ evaluate: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ var a = "PASS";
+ (async () => (A, a = "FAIL"))();
+ console.log(a);
+ }
+ expect: {
+ var a = "PASS";
+ (async () => (A, a = "FAIL"))();
+ console.log(a);
+ }
+ expect_stdout: "PASS"
+ node_version: ">=8"
+}