Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding class methods with reserved names is broken #1372

Closed
dbrans opened this issue May 16, 2011 · 7 comments
Closed

Binding class methods with reserved names is broken #1372

dbrans opened this issue May 16, 2011 · 7 comments
Labels

Comments

@dbrans
Copy link

dbrans commented May 16, 2011

Try compiling this: https://gist.github.com/973880
Cheers.

@taybenlor
Copy link

Literally just noticed this as well. Similar test case:

class Foo
  delete: =>

results in

  this."delete" = __bind(this."delete", this);;
       ^^^^^^^^
SyntaxError: Unexpected string

@satyr
Copy link
Collaborator

satyr commented May 17, 2011

super suffers this as well.

$ coffee -bpe 'A::go = -> super'
A.prototype.go = function() {
  return A.__super__.go.apply(this, arguments);
};

$ coffee -bpe 'A::do = -> super'
SyntaxError: cannot call super on an anonymous function.

@michaelficarra
Copy link
Collaborator

@dbrans: @xachro: the above commit fixes this issue.

@michaelficarra
Copy link
Collaborator

@satyr: can you open a new issue with the issue you mentioned?

@satyr
Copy link
Collaborator

satyr commented May 24, 2011

can you open a new issue

In addition to #1380?

@michaelficarra
Copy link
Collaborator

Oh, I see. You already opened one. Alright, we're good then.

@taybenlor
Copy link

Cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants