fix(37791): fix incorrect private field access in a computed property name (#38135)

This commit is contained in:
Oleksandr T
2021-01-05 00:01:54 +02:00
committed by GitHub
parent 222f29f2a5
commit 841b1a5bc7
22 changed files with 1305 additions and 3 deletions

View File

@@ -90,8 +90,6 @@ namespace ts {
return visitPropertyDeclaration(node as PropertyDeclaration);
case SyntaxKind.VariableStatement:
return visitVariableStatement(node as VariableStatement);
case SyntaxKind.ComputedPropertyName:
return visitComputedPropertyName(node as ComputedPropertyName);
case SyntaxKind.PropertyAccessExpression:
return visitPropertyAccessExpression(node as PropertyAccessExpression);
case SyntaxKind.PrefixUnaryExpression:
@@ -184,7 +182,7 @@ namespace ts {
let node = visitEachChild(name, visitor, context);
if (some(pendingExpressions)) {
const expressions = pendingExpressions;
expressions.push(name.expression);
expressions.push(node.expression);
pendingExpressions = [];
node = factory.updateComputedPropertyName(
node,