Merge branch 'master' into harmony

This commit is contained in:
Richard van Velzen
2016-08-17 08:50:31 +02:00
2 changed files with 30 additions and 0 deletions

View File

@@ -575,6 +575,8 @@ function OutputStream(options) {
});
PARENS([ AST_Unary, AST_Undefined ], function(output){
if (this.expression instanceof AST_Call)
return false;
var p = output.parent();
return p instanceof AST_PropAccess && p.expression === this
|| p instanceof AST_Call && p.expression === this

View File

@@ -130,3 +130,31 @@ negate_iife_issue_1073: {
}(7))();
}
}
issue_1254_negate_iife_false: {
options = {
negate_iife: false,
}
input: {
(function() {
return function() {
console.log('test')
};
})()();
}
expect_exact: '(function(){return function(){console.log("test")}})()();'
}
issue_1254_negate_iife_true: {
options = {
negate_iife: true,
}
input: {
(function() {
return function() {
console.log('test')
};
})()();
}
expect_exact: '!function(){return function(){console.log("test")}}()();'
}