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

This commit is contained in:
Oleksandr T authored and GitHub committed 2021-01-04 14:01:54 -08:00
1 parent 222f29f2a5
commit 841b1a5bc7
22 files changed
+1305 -3

No files matched your search

+1 -3
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,