Rich-Harris / butternut

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

Fails with duplicate var declarations #3

Closed Rich-Harris closed 7 years ago

Rich-Harris commented 7 years ago

This fails:

function x () {
  for ( var i = 0; i < 10; i += 1 ) {
    console.log(i);
  }

  for ( var i = 0; i < 10; i += 1 ) {
    console.log(i);
  }
}

Separately, this could be better optimised:

var i = 1;
var i = 2;
Rich-Harris commented 7 years ago

Fixed in 0.3.2