Fix bugs in compiler uncovered by better intersections
This commit is contained in:
Родитель
ef939c5388
Коммит
aaeaeab9eb
|
@ -1795,9 +1795,7 @@ namespace ts {
|
|||
|
||||
const target = getTargetOfBindingOrAssignmentElement(bindingElement);
|
||||
if (target && isPropertyName(target)) {
|
||||
return isComputedPropertyName(target) && isStringOrNumericLiteral(target.expression)
|
||||
? target.expression
|
||||
: target;
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -976,7 +976,7 @@ namespace ts {
|
|||
);
|
||||
}
|
||||
|
||||
function visitArrayAssignmentTarget(node: AssignmentPattern) {
|
||||
function visitArrayAssignmentTarget(node: BindingOrAssignmentElement) {
|
||||
const target = getTargetOfBindingOrAssignmentElement(node);
|
||||
if (target && isPrivateIdentifierPropertyAccessExpression(target)) {
|
||||
const wrapped = wrapPrivateIdentifierForDestructuringTarget(target);
|
||||
|
|
Загрузка…
Ссылка в новой задаче