Created
May 16, 2011 03:23
-
-
Save dbrans/973880 to your computer and use it in GitHub Desktop.
CoffeeScript Bug: binding class methods with reserved names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test | |
export: => | |
The js compilation I get is this (note the ' this."export" ') | |
var Test; | |
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
Test = (function() { | |
function Test() { | |
this."export" = __bind(this."export", this); | |
} | |
Test.prototype["export"] = function() {}; | |
return Test; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment