Skip to content

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

@cueedee

Description

@cueedee

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions