maxtaco / coffee-script

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

fat arrow Class bindings break when preceeded by await blocks #115

Open disruptek opened 10 years ago

disruptek commented 10 years ago

If iced boilerplate appears above the class definition, then fat arrow targets are incorrectly bound to _this instead of this. Tested with 1.7.1-a.

# enable this, output is `Object`
# disable this, output is `One`
await setTimeout defer(), 0

class One
    a: => @__proto__.constructor.name

one = new One()
two = one.a
console.log two()