Open anilanar opened 7 years ago
UglifyJS output:
new((new X).Y().z) wrong
Using butternut's copy of uglify-js
and uglify-es
...
$ node_modules/uglify-js/bin/uglifyjs -V
uglify-js 3.0.9
$ echo 'new new X().Y().z' | node_modules/uglify-js/bin/uglifyjs -b
new (new X().Y)().z;
$ echo 'new new X().Y().z' | node_modules/uglify-js/bin/uglifyjs -cm
(new((new X).Y)).z;
$ node_modules/uglify-es/bin/uglifyjs -V
uglify-es 3.0.9
$ echo 'new new X().Y().z' | node_modules/uglify-es/bin/uglifyjs -b
new (new X().Y)().z;
$ echo 'new new X().Y().z' | node_modules/uglify-es/bin/uglifyjs -cm
(new((new X).Y)).z;
Can this be merged?
@adamdupuis I think the project is on complete halt.
I mimicked UglifyJS except for the last test case with wrapped new expressions.
For
new new X().Y().z
UglifyJS output:
new((new X).Y().z)
wrong butternut output:(new (new X).Y).z
correctTo test it, use the following: