fix corner cases in inline & unused (#5534)

fixes #5533
This commit is contained in:
Alex Lam S.L
2022-06-30 08:34:45 +01:00
committed by GitHub
parent 2426657daa
commit 4c227cc6bd
7 changed files with 694 additions and 12 deletions

View File

@@ -778,9 +778,9 @@ function compare_run_code(code, minify_options, result_cache, max_timeout) {
function run(code, timeout) {
if (minify_options.module) code = [
'"use strict";',
"(async ()=>{",
"(async()=>{",
code,
"})().catch(e=>console.log(e));",
'})().catch(e=>process.on("exit",()=>{throw e}));',
].join("\n");
return run_code(code, toplevel, result_cache, timeout);
}