aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-01-23 02:49:54 +0800
committerGitHub <noreply@github.com>2018-01-23 02:49:54 +0800
commitec4202590d040942639e01eb8ae83bf7be7180dd (patch)
treeb1f857c6051f50c1e792dd0bc4f1ebd9382e9de6 /test
parent5e2cd07d6f6866b1ddae51a4c9b280d2cd527973 (diff)
downloadtracifyjs-ec4202590d040942639e01eb8ae83bf7be7180dd.tar.gz
tracifyjs-ec4202590d040942639e01eb8ae83bf7be7180dd.zip
drop assignments to constant expressions only (#2839)
fixes #2838
Diffstat (limited to 'test')
-rw-r--r--test/compress/pure_getters.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js
index 80b0e8ea..4e9ae4f4 100644
--- a/test/compress/pure_getters.js
+++ b/test/compress/pure_getters.js
@@ -694,3 +694,30 @@ issue_2678: {
}
expect_stdout: "PASS"
}
+
+issue_2838: {
+ options = {
+ pure_getters: true,
+ side_effects: true,
+ }
+ input: {
+ function f(a, b) {
+ (a || b).c = "PASS";
+ (function() {
+ return f(a, b);
+ }).prototype.foo = "bar";
+ }
+ var o = {};
+ f(null, o);
+ console.log(o.c);
+ }
+ expect: {
+ function f(a, b) {
+ (a || b).c = "PASS";
+ }
+ var o = {};
+ f(null, o);
+ console.log(o.c);
+ }
+ expect_stdout: "PASS"
+}
lass='msg-tooltip'>* guix/inferior.scm (inferior-package->manifest-entry): New procedure. * tests/inferior.scm (manifest-entry->list): New procedure. ("inferior-package->manifest-entry"): New test. Ludovic Courtès 2018-09-21inferior: Add 'inferior-package-search-paths' & co....* guix/inferior.scm (%inferior-package-search-paths) (inferior-package-native-search-paths) (inferior-package-search-paths) (inferior-package-transitive-native-search-paths): New procedures. * tests/inferior.scm ("inferior-package-search-paths"): New test. Ludovic Courtès 2018-09-21inferior: Add 'inferior-package-inputs' & co....* guix/inferior.scm (open-inferior): Use (ice-9 match). (inferior-package-input-field, inferior-package-inputs): (inferior-package-native-inputs) (inferior-package-propagated-inputs) (inferior-package-transitive-propagated-inputs): New procedures. * tests/inferior.scm ("inferior-package-inputs"): New test. inputs fixlet Ludovic Courtès 2018-09-21inferior: Add 'lookup-inferior-packages'....* guix/inferior.scm (<inferior>)[packages, table]: New fields. (open-inferior): Initialize these new fields. (inferior-packages): Rename to... (%inferior-packages): ... this. (inferior-packages): New procedure; force the promise. (%inferior-package-table, lookup-inferior-packages): New procedures. * tests/inferior.scm ("lookup-inferior-packages") ("lookup-inferior-packages and eq?-ness"): New tests. Ludovic Courtès 2018-09-21inferior: Add 'inferior-package-derivation'....* guix/inferior.scm (read-inferior-response) (send-inferior-request): New procedures. (inferior-eval): Rewrite in terms of these. (proxy, inferior-package-derivation, inferior-package->derivation) (package-compiler): New procedures. * tests/inferior.scm ("inferior-package-derivation"): New test. Ludovic Courtès 2018-09-04inferior: Add home-page and location package accessors....* guix/inferior.scm (inferior-package-home-page) (inferior-package-location): New procedures. * tests/inferior.scm ("inferior-packages"): Test them. Ludovic Courtès 2018-07-13Add (guix inferior) and (guix scripts repl)....* guix/inferior.scm, guix/scripts/repl.scm, tests/inferior.scm: New files. * Makefile.am (MODULES): Add 'guix/scripts/repl.scm' and 'guix/inferior.scm'. (SCM_TESTS): Add 'tests/inferior.scm'. * doc/guix.texi (Invoking guix repl): New node. Ludovic Courtès