Skip to content

Conversation

@mhegazy
Copy link
Contributor

@mhegazy mhegazy commented May 4, 2016

Fixes #8415

This also adds support for find all refs and rename for computed property names with literal expressions. in the past we just ignored computed properties all together, but we then excluded the numeric and string literal ones, but never added the LS support for them.

@yuit
Copy link
Contributor

yuit commented May 4, 2016

@mhegazy I didn't see any tests for original cases report in issue #8415. Also as a clarification, is this PR will address @basarat comment in the issues?

@mhegazy
Copy link
Contributor Author

mhegazy commented May 4, 2016

yes. i fixed the other one two weeks ago in #8210. this is mainly for the issue @basarat reported, as well as computed property issues i ran through while working on it.

export function isLiteralComputedPropertyDeclarationName(node: Node) {
return (node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NumericLiteral) &&
node.parent.kind === SyntaxKind.ComputedPropertyName &&
(<ComputedPropertyName>node.parent).expression === node &&
Copy link
Contributor

Choose a reason for hiding this comment

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

is this check necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right. removed.

@mhegazy
Copy link
Contributor Author

mhegazy commented May 10, 2016

@yuit any more comments?

@yuit
Copy link
Contributor

yuit commented May 10, 2016

lgtm 🍰

@mhegazy mhegazy merged commit 0120d7b into master May 10, 2016
@mhegazy mhegazy deleted the Fix8415 branch May 10, 2016 17:54
@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.

4 participants