aboutsummaryrefslogtreecommitdiff
path: root/test/compress/awaits.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-26 17:30:05 +0000
committerGitHub <noreply@github.com>2021-01-27 01:30:05 +0800
commitd0bb1476397d2cf6f240267aa003fe6edc445683 (patch)
treea91cafad84bf927cc5d57048bdf83daacb4ad0fb /test/compress/awaits.js
parent4723b4541e08fe9bdafbcae723e8e9cca65fa83f (diff)
downloadtracifyjs-d0bb1476397d2cf6f240267aa003fe6edc445683.tar.gz
tracifyjs-d0bb1476397d2cf6f240267aa003fe6edc445683.zip
fix corner case in `inline` (#4596)
fixes #4595
Diffstat (limited to 'test/compress/awaits.js')
-rw-r--r--test/compress/awaits.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/awaits.js b/test/compress/awaits.js
index 0ffa1a9b..01a55710 100644
--- a/test/compress/awaits.js
+++ b/test/compress/awaits.js
@@ -1024,3 +1024,26 @@ issue_4581: {
expect_stdout: "PASS"
node_version: ">=8"
}
+
+issue_4595: {
+ options = {
+ awaits: true,
+ inline: true,
+ }
+ input: {
+ (async function() {
+ await async function f() {
+ console.log(f.length);
+ }();
+ })();
+ }
+ expect: {
+ (async function() {
+ await async function f() {
+ console.log(f.length);
+ }();
+ })();
+ }
+ expect_stdout: "0"
+ node_version: ">=8"
+}