Skip to content

fix(35944): Debug failure for spell checking of non-existent private named property access #36195

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

Conversation

a-tarasyuk
Copy link
Contributor

Fixes #35944

@@ -36,12 +36,13 @@ namespace ts.codefix {

let suggestion: string | undefined;
if (isPropertyAccessExpression(node.parent) && node.parent.name === node) {
Debug.assert(node.kind === SyntaxKind.Identifier, "Expected an identifier for spelling (property access)");
Debug.assert(isIdentifierOrPrivateIdentifier(node), "Expected an identifier for spelling (property access)");
Copy link
Contributor

Choose a reason for hiding this comment

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

If you use Debug.assertNode, you don't need the type assertion below.

@sandersn sandersn merged commit dbd55b3 into microsoft:master Jan 16, 2020
Kingwl pushed a commit to Kingwl/TypeScript that referenced this pull request Mar 4, 2020
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

Successfully merging this pull request may close these issues.

Debug failure for spell checking of non-existent private named property access
4 participants