aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compress/awaits.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/compress/awaits.js b/test/compress/awaits.js
index 18012b48..77735991 100644
--- a/test/compress/awaits.js
+++ b/test/compress/awaits.js
@@ -1218,3 +1218,31 @@ issue_4598: {
expect_stdout: "PASS"
node_version: ">=8"
}
+
+issue_4618: {
+ options = {
+ functions: true,
+ reduce_vars: true,
+ unused: true,
+ }
+ input: {
+ console.log(typeof function() {
+ var await = async function f() {
+ console || f();
+ };
+ console.log;
+ return await;
+ }());
+ }
+ expect: {
+ console.log(typeof function() {
+ var await = async function f() {
+ console || f();
+ };
+ console.log;
+ return await;
+ }());
+ }
+ expect_stdout: "function"
+ node_version: ">=8"
+}