Skip to content

Fix #8415: consider accessors when searching for contextually typed properties - #8456

Merged
Mohamed Hegazy (mhegazy) merged 8 commits into
masterfrom
Fix8415
May 10, 2016
Merged

Mohamed Hegazy (mhegazy) merged 8 commits into
masterfrom
Fix8415

Conversation

@mhegazy

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@mhegazy

Copy link
Copy Markdown
Contributor Author

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

Comment thread src/compiler/utilities.ts Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Yui (@yuit) any more comments?

@yuit

Copy link
Copy Markdown
Contributor

lgtm 🍰

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

3 participants