fix corner case in evaluate (#4341)

fixes #4340
This commit is contained in:
Alex Lam S.L
2020-12-07 08:05:11 +00:00
committed by GitHub
parent 2f31f95095
commit fbecedf94c
4 changed files with 32 additions and 11 deletions

View File

@@ -569,6 +569,10 @@ var AST_Function = DEFNODE("Function", "inlined", {
},
}, AST_Lambda);
function is_defun(node) {
return node instanceof AST_AsyncDefun || node instanceof AST_Defun;
}
var AST_AsyncDefun = DEFNODE("AsyncDefun", null, {
$documentation: "An asynchronous function definition",
_validate: function() {