Skip to content

Fix emit with this and rest parameters #9692

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

Merged
merged 3 commits into from
Jul 21, 2016

Conversation

sandersn
Copy link
Member

Fixes #9682

and also fixes the same problem when emitting decorator metadata.

sandersn added 2 commits July 13, 2016 11:42
Also test that it's skipped when emitting decorator metadata
@@ -6155,10 +6156,11 @@ const _super = (function (geti, seti) {

if (valueDeclaration) {
const parameters = valueDeclaration.parameters;
const skipThisCount = parameters.length && (<Identifier>parameters[0].name).text === "this" ? 1 : 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

parameters[0].originalKeywordKind === SyntaxKind.ThisKeyword

@sandersn
Copy link
Member Author

@mhegazy are you OK with merging this now?

@mhegazy
Copy link
Contributor

mhegazy commented Jul 21, 2016

👍

@mhegazy
Copy link
Contributor

mhegazy commented Jul 21, 2016

We will need to merge this in release-2.0 as well.

@sandersn sandersn merged commit 57eac1b into master Jul 21, 2016
@sandersn
Copy link
Member Author

Done. I cherry-picked the commits into release-2.0

@mhegazy mhegazy deleted the fix-emit-with-this-and-rest-parameters branch July 22, 2016 19:50
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Returning a function with "this" typing and rest parameter down-emit incorrect
3 participants