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

Function Inlining loses captures of "super" #3046

Closed
ChadKillingsworth opened this issue Aug 7, 2018 · 1 comment
Closed

Function Inlining loses captures of "super" #3046

ChadKillingsworth opened this issue Aug 7, 2018 · 1 comment
Assignees

Comments

@ChadKillingsworth
Copy link
Collaborator

Rewriting Async methods produces code such as:

class Foo extends Bar {
  baz() {
    const jscomp$get$super$baz = () => super.baz;
    const jscomp$this = this;
    return function() {
      jscomp$get$super$baz().call(jscomp$this);
    }
  }
}

Currently, function inling will inline the super.baz return value from the arrow function to produce an invalid reference to super. This only seems to show up with ES2015 out as a language.

@MatthewMerrill
Copy link
Contributor

Submitted fix internally

tjgq pushed a commit that referenced this issue Aug 10, 2018
… "super".

Related to: #3015
Related to: #3046

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207971077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants