Parens get stripped inappropriately when called #1

Closed
mattsta opened this Issue Feb 8, 2011 · 1 comment

2 participants

@mattsta

Correct (normal uglifyjs):
% echo "list = [1, 2, 3, 4, 5]"|coffee -s -p | uglifyjs
(function(){var a;a=[1,2,3,4,5]}).call(this)

Broken (cl-uglify-js):
% echo "list = [1, 2, 3, 4, 5]"|coffee -s -p | cl-uglify-js
function(){var a;a=[1,2,3,4,5]}.call(this);

cl-uglify-js does the right transformation for (function() { ... })(); but not for (function() { ... }).call(this);

@mishoo
Owner

closed by 7ef0999 -- add parens in (function(){...}).foo when the function is first
thing in a statement

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment