aboutsummaryrefslogtreecommitdiff
path: root/test/compress/reduce_vars.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-06-23 04:44:57 +0800
committerGitHub <noreply@github.com>2017-06-23 04:44:57 +0800
commit3d5bc081851897648ccc71009a2138240fe41fa0 (patch)
treed8d3a51a3adf82d58d25e45ac49afe02ae1548b1 /test/compress/reduce_vars.js
parent0692435f01aad54fb586d24ad0c118d70b5c26ee (diff)
downloadtracifyjs-3d5bc081851897648ccc71009a2138240fe41fa0.tar.gz
tracifyjs-3d5bc081851897648ccc71009a2138240fe41fa0.zip
fix `reduce_vars` on `this` (#2145)
fixes #2140
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r--test/compress/reduce_vars.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js
index cef29832..5906a971 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -2575,3 +2575,28 @@ accessor: {
}
expect_stdout: "1 1"
}
+
+for_in_prop: {
+ options = {
+ reduce_vars: true,
+ }
+ input: {
+ var a = {
+ foo: function() {
+ for (this.b in [1, 2]);
+ }
+ };
+ a.foo();
+ console.log(a.b);
+ }
+ expect: {
+ var a = {
+ foo: function() {
+ for (this.b in [1, 2]);
+ }
+ };
+ a.foo();
+ console.log(a.b);
+ }
+ expect_stdout: "1"
+}
> 2024-02-20gnu: rust-1.55: Build with fewer packages....Efraim Flashner 2024-02-20gnu: rust-bootstrap: Build with fewer packages....Efraim Flashner 2024-02-20gnu: rust: Update to 1.75.0....Efraim Flashner 2024-02-20gnu: rust-1.55: Build without jemalloc....Efraim Flashner 2024-02-20gnu: rust: Use platform-rust-target....Efraim Flashner 2024-02-20gnu: rust: Update to 1.74.1....Efraim Flashner 2024-02-20gnu: rust: Move remove-uninstall-script to rust....Efraim Flashner 2024-01-14gnu: Make intermediate packages public but hidden....Ludovic Courtès 2024-01-12packages: rust: Memoize make-rust-sysroot results....Christopher Baines 2023-12-13gnu: rust-1.64: Don't make package public....Efraim Flashner 2023-11-28gnu: rust: Add triplets for Windows....Efraim Flashner 2023-11-28gnu: rust: Add triplet for the Hurd....Efraim Flashner 2023-11-28gnu: Add make-rust-sysroot....Efraim Flashner 2023-11-28gnu: rust: Allow using custom rust-src for rust-analyzer....Efraim Flashner 2023-11-28gnu: rust-analyzer: Move to rust.scm....Efraim Flashner 2023-11-28gnu: Remove rust-src-1.64....Efraim Flashner 2023-11-28gnu: rust: Update to 1.73.0....Efraim Flashner 2023-10-23gnu: Add rust-1.73....Herman Rimm 2023-10-18gnu: Add rust-1.72....Efraim Flashner 2023-10-18gnu: Add rust-1.71....Efraim Flashner 2023-10-18gnu: rust: Fix test failures on some architectures....Efraim Flashner 2023-10-18gnu: rust: Wrap rust-analyzer with rust source....Efraim Flashner 2023-10-18gnu: rust: Build more tools....Efraim Flashner 2023-10-18gnu: rust: Update to 1.70.0....Efraim Flashner 2023-10-18gnu: rust: Add make-ignore-test-list function....Fries 2023-10-18gnu: Add rust-1.70....Fries 2023-10-18gnu: Add rust-1.69....Fries