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

Embedded javascript this in fat-arrow function should not compile to _this #4302

Closed
cueedee opened this issue Sep 2, 2016 · 3 comments
Closed

Comments

@cueedee
Copy link

cueedee commented Sep 2, 2016

This 1.10.0 code:

() => 
  foo = this
  bar = `this`
  return

Compiles to:

(function(_this) {
  return (function() {
    var bar, foo;
    foo = _this;
    bar = _this;
  });
})(this);

Whereas I really expected it to compile to:

(function(_this) {
  return (function() {
    var bar, foo;
    foo = _this;
    bar = this;
  });
})(this);
@vendethiel
Copy link
Collaborator

That was fixed in #4198. We probably should get a release going...

@cueedee
Copy link
Author

cueedee commented Sep 2, 2016

Cool! Apologies for failing to find the dups first (#2009 et al.)

@vendethiel
Copy link
Collaborator

No problem. It's my job to find dupes and all :).

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

No branches or pull requests

2 participants