Rich-Harris / butternut

The fast, future-friendly minifier
https://butternut.now.sh
MIT License
1.17k stars 17 forks source link

Identifier has already been declared issue #191

Open Wandalen opened 7 years ago

Wandalen commented 7 years ago

Hello. Does not work for me. Is it possible to avoid the intrusion?

Identifier 'err' has already been declared (143193:14)
    143193 :           var err = _.err( err );
                           ^" 
nifgraup commented 7 years ago

How does the original code looks like that turns into this?

Wandalen commented 7 years ago

Here it is. Hopefully it will help.

nifgraup commented 7 years ago

Thanks, here is the minimal reproduction step try{}catch(e){var e} , https://butternut.now.sh/?version=0.4.6&gist=0671af437ed65a86f92eb4fd5d1b5bdd

Wandalen commented 7 years ago

Looks like that.

nifgraup commented 7 years ago

This is a bug in acorn https://github.com/ternjs/acorn/issues/548

Wandalen commented 7 years ago

I see.