Skip to content

[Transforms] Capture this in computed property names in arrow functions#8069

Merged
sandersn merged 3 commits into
transformsfrom
transforms-capture-this-in-computed-property-names-in-arrow-functions
Apr 14, 2016
Merged

[Transforms] Capture this in computed property names in arrow functions#8069
sandersn merged 3 commits into
transformsfrom
transforms-capture-this-in-computed-property-names-in-arrow-functions

Conversation

@sandersn
Copy link
Copy Markdown
Member

Fixes #7860

Fixes baselines:

  1. computedPropertyNames29_ES5
  2. computedPropertyNames31_ES5

@mhegazy mhegazy added the Domain: API: Transforms Relates to the public transform API label Apr 13, 2016
@sandersn sandersn changed the title Capture this in computed property names in arrow functions [Transforms] Capture this in computed property names in arrow functions Apr 13, 2016
Comment thread src/compiler/binder.ts
// is an ES6 node.
transformFlags = TransformFlags.AssertES6;
}
if (subtreeFlags & TransformFlags.ContainsLexicalThisInComputedPropertyName) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add comment about the discussion you have with @rbuckton why you convert this to "ContainsLexicalThis"

@rbuckton
Copy link
Copy Markdown
Contributor

👍 (after adding comments per @yuit above)

@yuit
Copy link
Copy Markdown
Contributor

yuit commented Apr 14, 2016

👍 after add comment.

@sandersn
Copy link
Copy Markdown
Member Author

OK, it's done, but it is surprisingly hard to explain in writing. :)

@sandersn sandersn merged commit f13753d into transforms Apr 14, 2016
@sandersn sandersn deleted the transforms-capture-this-in-computed-property-names-in-arrow-functions branch April 14, 2016 16:52
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Domain: API: Transforms Relates to the public transform API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants