diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-11-25 22:52:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-25 22:52:46 +0800 |
commit | c141ae6f8dcfa058f03ae3580275c87b564b77a3 (patch) | |
tree | 28158152aed32b9cd5ed86528b6687c3e20f5b5a /test | |
parent | 97c464dbf5aec124cba9cfeedb896fa97818622c (diff) | |
download | tracifyjs-c141ae6f8dcfa058f03ae3580275c87b564b77a3.tar.gz tracifyjs-c141ae6f8dcfa058f03ae3580275c87b564b77a3.zip |
fix argument/atom collision by `properties` (#2514)
fixes #2513
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/properties.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/properties.js b/test/compress/properties.js index f2e59321..6d4c0281 100644 --- a/test/compress/properties.js +++ b/test/compress/properties.js @@ -1028,3 +1028,29 @@ new_this: { }(42); } } + +issue_2513: { + options = { + evaluate: true, + properties: true, + } + input: { + !function(Infinity, NaN, undefined) { + console.log("a"[1/0], "b"["Infinity"]); + console.log("c"[0/0], "d"["NaN"]); + console.log("e"[void 0], "f"["undefined"]); + }(0, 0, 0); + } + expect: { + !function(Infinity, NaN, undefined) { + console.log("a"[1/0], "b"[1/0]); + console.log("c".NaN, "d".NaN); + console.log("e"[void 0], "f"[void 0]); + }(0, 0, 0); + } + expect_stdout: [ + "undefined undefined", + "undefined undefined", + "undefined undefined", + ] +} |