mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix(37791): fix incorrect private field access in a computed property name (#38135)
This commit is contained in:
1 parent
222f29f2a5
commit
841b1a5bc7
22 files changed
+1305
-3
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user