aboutsummaryrefslogtreecommitdiff
path: root/test/compress/functions.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-04-19 19:01:47 +0800
committerGitHub <noreply@github.com>2019-04-19 19:01:47 +0800
commit00833e893a3d21745fc6a66d9d43e0e988b0d72b (patch)
tree4b721156ddbfc3fae389dd1e1c39e5401db7a7eb /test/compress/functions.js
parentf1a77e4fc03a3ff9e217992e5aa1a62fc35e0f2f (diff)
downloadtracifyjs-00833e893a3d21745fc6a66d9d43e0e988b0d72b.tar.gz
tracifyjs-00833e893a3d21745fc6a66d9d43e0e988b0d72b.zip
enhance `functions` (#3368)
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r--test/compress/functions.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index 7303b91b..64f3bbcc 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -2712,8 +2712,8 @@ functions: {
}
input: {
!function() {
- var a = function() {
- return "a";
+ var a = function a() {
+ return a && "a";
};
var b = function x() {
return !!x;
@@ -2736,19 +2736,19 @@ functions: {
expect: {
!function() {
function a() {
- return "a";
+ return a && "a";
+ }
+ function b() {
+ return !!b;
}
- var b = function x() {
- return !!x;
- };
var c = function(c) {
return c;
};
if (c(b(a()))) {
function d() {}
- var e = function y() {
- return typeof y;
- };
+ function e() {
+ return typeof e;
+ }
var f = function(f) {
return f;
};
@@ -2768,8 +2768,8 @@ functions_use_strict: {
input: {
"use strict";
!function() {
- var a = function() {
- return "a";
+ var a = function a() {
+ return a && "a";
};
var b = function x() {
return !!x;
@@ -2793,11 +2793,11 @@ functions_use_strict: {
"use strict";
!function() {
function a() {
- return "a";
+ return a && "a";
+ }
+ function b() {
+ return !!b;
}
- var b = function x() {
- return !!x;
- };
var c = function(c) {
return c;
};