maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
727 stars 58 forks source link

autocb doesn't work with fat arrow #148

Closed davidbau closed 9 years ago

davidbau commented 9 years ago

autocb doesn't work with fat arrow.

Consider the following:

f = (autocb) =>

In iced 1.8.0-c, it generates the following:

var f;

f = (function(_this) {
  autocb(function(autocb) {
    autocb();
    return;
  });
  return;
})(this);

Notice that "autocb" is used before it is defined - it seems to be wrapping the inner return with an autocb. This should be suppressed.